Track nullability information in publicAPI files for C# compiler#41000
Track nullability information in publicAPI files for C# compiler#41000jcouv merged 2 commits intodotnet:mainfrom
Conversation
1cb27fe to
0c33b24
Compare
|
Here's the latest set of oblivious APIs: |
|
I'll try to push this PR forward using |
|
@dotnet/roslyn-compiler for review. Thanks |
| // See the LICENSE file in the project root for more information. | ||
|
|
||
| #nullable disable | ||
| #pragma warning disable RS0041 // uses oblivious reference types |
There was a problem hiding this comment.
There aren't that many APIs in these files. Should we just annotate them?
There was a problem hiding this comment.
I'd tried that but it snowballed the change. Admittedly this was a while back, but my recollection is some of those have many usage sites that needed adjustment. So I'd kept the PR focused on its primary purpose.
|
Done review pass (commit 1) |
|
Could you please include the instructions in the PR description in some in-repo documentation? |
Done. However the instructions will need to be updated/simplified when certain bits are published. @JoeRobich can advise. |
RikkiGibson
left a comment
There was a problem hiding this comment.
LGTM, but it still wasn't clear to me how/when the fixer was changed to include non-annotated and oblivious reference types.
|
In my opinion, the PR title "Update Public API files" includes no useful information that one generally expects to find there. |
|
@RikkiGibson The functionality for the publicAPI analyzer/fixer to track nullability annotations was added a while back. We've turned on |
Note: this PR was updated to track APIs involving oblivious reference types with a
~prefix.This PR ran into issue #50357
But the public API fixer can be run with the instructions below:
C:\Source\roslyn> dotnet tool install -g dotnet-format --version "6.*" --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.jsonC:\Source\roslyn> .\restore.cmdC:\Source\roslyn> .\build.cmdC:\Source\roslyn> cd ..C:\Source> dotnet-format analyzers .\roslyn\Compilers.sln --diagnostics=RS0016 --no-restore --include-generated -v diag