[
https://issues.apache.org/jira/browse/TINKERPOP-2348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17634898#comment-17634898
]
ASF GitHub Bot commented on TINKERPOP-2348:
-------------------------------------------
FlorianHockmann opened a new pull request, #1867:
URL: https://github.com/apache/tinkerpop/pull/1867
https://issues.apache.org/jira/browse/TINKERPOP-2348
This only adds nullable annotations to the projects Gremlin.Net and the
Gremlin.Net.Template, but not to the test projects. I intend to add it there in
a follow-up PR to at least somehow limit the scope of this commit. This takes
already care of everything user-facing.
This unfortunately includes a few breaking changes (not necessarily
complete):
- Message types:
* Some set property accessors removed
- Structure types:
* Some set property accessors removed
- `DefaultTraversal.Bytecode` now abstract
- `GraphBinaryReader`/`Writer`
* `ReadValueAsync` / `WriteValueAsync` were split into two methods, for
nullable and non-nullable values
- Changed exceptions: Instead of `NullReferenceExceptions`, `IOExceptions`
should be thrown during serialization
Most of these breaking changes are also mentioned in the upgrade docs. I
haven't added all of them there as I found it to be unlikely that anyone is
really affected by them.
VOTE +1
> Enable nullable checks
> ----------------------
>
> Key: TINKERPOP-2348
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2348
> Project: TinkerPop
> Issue Type: Improvement
> Components: dotnet
> Affects Versions: 3.4.11
> Reporter: Florian Hockmann
> Assignee: Florian Hockmann
> Priority: Minor
>
> Gremlin.NET should enable [nullable
> checks|https://devblogs.microsoft.com/dotnet/embracing-nullable-reference-types/]
> to clearly communicate to users what can be {{null}} in Gremlin.NET and also
> to possibly find possible {{NullReferenceExceptions}} easier in our own code.
> The recommendation from Microsoft is to update libraries during the so-called
> _"nullable rollout phase"_ which ends in November with the expected release
> of .NET 5 which should have nullable checks enabled by default.
> We can add .NET Core 3.1 as an additional target framework to get the
> nullable checks and still also target .NET Standard to stay platform
> independent and to also still support .NET Framework and older .NET Core
> versions.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)