Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 6 commits into from Nov 20, 2020

Conversation

pCYSl5EDgo
Copy link
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
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?

src/MessagePack.GeneratorCore/CodeGenerator.cs Outdated Show resolved Hide resolved
src/MessagePack.GeneratorCore/CodeAnalysis/Definitions.cs Outdated Show resolved Hide resolved
@neuecc
Copy link
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.

None yet

3 participants