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

Add $(Nullable) = annotations to projects using NRT annotations without NRT enabled. #9660

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

jpobst
Copy link
Contributor

@jpobst jpobst commented Jan 8, 2025

Several of our projects that have not been NRT enabled import .cs files from other projects that do have NRT annotations.

This results in warning CS8632:

warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

We can allow NRT annotations without enabling NRT by adding <Nullable>annotations</Nullable> to these projects, fixing ~100 build warnings.

@jpobst jpobst marked this pull request as ready for review January 8, 2025 21:28
@dellis1972 dellis1972 merged commit ae63447 into main Jan 9, 2025
60 checks passed
@dellis1972 dellis1972 deleted the nullable-annotations branch January 9, 2025 08:32
grendello added a commit that referenced this pull request Jan 9, 2025
* main:
  Add `$(Nullable)` = `annotations` to projects using NRT annotations without NRT enabled. (#9660)
  [Xamarin.Android.Build.Tasks] Add %(NuGetPackage*) to TaskItems (#9559)
  Bump to dotnet/java-interop@ee47652d (#9659)
  [XABT] Remove <CollectAssemblyFilesForArchive/> from FastDeployment (#9650)
  [Mono.Android] Generate API docs for API level 35 (#9647)
  [java-runtime] simplify `mono.MonoPackageManager.LoadApplication()` (#9655)
  [Mono.Android] Bind Android API-Baklava DP2. (#9653)
  [build+macOS] Remove quarantine from OpenJDK installations (#9652)
grendello added a commit that referenced this pull request Jan 9, 2025
* dev/grendel/use-libc++:
  Add `$(Nullable)` = `annotations` to projects using NRT annotations without NRT enabled. (#9660)
  [Xamarin.Android.Build.Tasks] Add %(NuGetPackage*) to TaskItems (#9559)
  Bump to dotnet/java-interop@ee47652d (#9659)
  [XABT] Remove <CollectAssemblyFilesForArchive/> from FastDeployment (#9650)
  [Mono.Android] Generate API docs for API level 35 (#9647)
  [java-runtime] simplify `mono.MonoPackageManager.LoadApplication()` (#9655)
  [Mono.Android] Bind Android API-Baklava DP2. (#9653)
  [build+macOS] Remove quarantine from OpenJDK installations (#9652)
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.

2 participants