Skip to content

MPC: nullable enable and update language version to 9.#1125

Merged
AArnott merged 6 commits intoMessagePack-CSharp:developfrom
pCYSl5EDgo:skip
Nov 20, 2020
Merged

MPC: nullable enable and update language version to 9.#1125
AArnott merged 6 commits intoMessagePack-CSharp:developfrom
pCYSl5EDgo:skip

Conversation

@pCYSl5EDgo
Copy link
Copy Markdown
Contributor

@pCYSl5EDgo pCYSl5EDgo commented Nov 19, 2020

Abstract

This Pull Request is a refactoring PR.

Background

Sometimes I forget null check of Namespace property of ObjectSerializationInfo.
I need null-safety.

Methods

<Nullable>enable</Nullable> and <LangVersion>9</LangVersion> are added to the MessagePack.GeneratorCore.csproj.

All types under src/MessagePack.GeneratorCore/CodeAnalysis/Definitions.cs have constructor and all their properties are now get-only to ensure null-safety.

src/MessagePack.GeneratorCore/Utils/RoslynExtensions.cs' not used functions are removed because they are internal api.

Copy link
Copy Markdown
Collaborator

@AArnott AArnott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love nullable ref annotations. Thanks for doing this. @neuecc?

@neuecc
Copy link
Copy Markdown
Member

neuecc commented Nov 20, 2020

Thanks, that's certainly OK in Generator.

@AArnott AArnott merged commit 010ed71 into MessagePack-CSharp:develop Nov 20, 2020
@pCYSl5EDgo pCYSl5EDgo deleted the skip branch November 20, 2020 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants