-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Java.Interop] Use PublicApiAnalyzers to ensure we do not break API (#…
…1170) Fixes: #1169 Context: dotnet/android@76ab8b2 dotnet/android@76ab8b2c mentions: > Now that we are in the .NET `TargetFramework` world we also need > to ensure we do not *add* any new API to a Target Framework once it > has shipped. A `TargetFramework` is essentially a contract that we > cannot change. (Imagine if you had different minor versions of .NET > on your local machine and CI machine, what works on one should work > on the other.) This prevents an issue where a user on `.NET 8.0.300` uses a method that isn't available to their coworker or CI on `.NET 8.0.100`. This logical argument also applies to `Java.Interop.dll`. Enable Microsoft's [PublicApiAnalyzers][0] for `Java.Interop.dll`. ([PublicApiAnalyzers documentation][1].) This ensures that we don't add new API once we've shipped `Java.Interop.dll` for a given .NET version. Update `build-tools/jnienv-gen` so that `JniEnvironment.g.cs` enables nullable reference types. This allows us to *avoid* disabling RS0041. Co-authored-by: Jonathan Pryor <jonpryor@vt.edu> [0]: https://github.com/dotnet/roslyn-analyzers/tree/ace28a1039d09626a94d3b0f8ce69e547ca2bcbf/src/PublicApiAnalyzers [1]: https://github.com/dotnet/roslyn-analyzers/blob/ace28a1039d09626a94d3b0f8ce69e547ca2bcbf/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md
- Loading branch information
Showing
8 changed files
with
2,017 additions
and
1,090 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.