Skip to content

Conversation

@WhitWaldo
Copy link
Contributor

@WhitWaldo WhitWaldo commented Jul 3, 2024

Description

This implements the nullability annotations across the Dapr.Client SDK both on the type level and with a few changes to the logic as necessary to facilitate these changes.

I couldn't leave the challenge posted here unanswered.

I again raise the issue over at #1261 to propose dropping support for both .NET 6 and .NET 7 as both are out of support officially and further, adopting a standard policy of targeting the latest C# language version. Here, this is relevant because while the csproj doesn't lack support for the <nullability>enable</nullability> tag, we don't adopt a specific C# language version, so because we target .NET 6, we implicitly target C# 10 and C# 10 requires explicit #nullability enable notations at the tops of each file implementing the same (e.g. it ignores the csproj annotation).

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #1316

Though this itself won't close #1316, but will at least let us check off the box for Dapr.Client as that's a larger over-arching issue tracking the end goal.

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • [N/A] Extended the documentation

WhitWaldo added 3 commits July 3, 2024 15:11
…which permits the project wide nullability marker in the csproj, but requires per-file nullability opt-in to avoid a build error.

Signed-off-by: Whit Waldo <[email protected]>
@WhitWaldo WhitWaldo requested review from a team as code owners July 3, 2024 20:41
@philliphoff philliphoff added this to the v1.15 milestone Jul 8, 2024
@WhitWaldo
Copy link
Contributor Author

Closing this issue as the intent going forward is simply to add nullability annotations by default on new Dapr.* packages while undergoing possible refactoring for performance and language improvements.

@WhitWaldo WhitWaldo closed this Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implementing .NET Dapr SDK-wide nullability annotations

2 participants