-
Notifications
You must be signed in to change notification settings - Fork 526
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
[LayoutBindings] LayoutBindings: 'PreserveAttribute' is obsolete warnings #8529
Merged
Commits on Mar 4, 2024
-
[LayoutBindings] LayoutBindings: 'PreserveAttribute' is obsolete warn…
…ings Fixes dotnet#7480 * Remove the use of `PreserveAttribute` as we no longer support Xamarin Classic in main. * Add #pragma and code comments to fix certain CS* warnings which are emitted by the C# compiler. * Ignore a bunch of other warnings in the unit test.
Configuration menu - View commit details
-
Copy full SHA for bf44afd - Browse repository at this point
Copy the full SHA bf44afdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3dc5ca7 - Browse repository at this point
Copy the full SHA 3dc5ca7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 04103bc - Browse repository at this point
Copy the full SHA 04103bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for f216115 - Browse repository at this point
Copy the full SHA f216115View commit details -
Configuration menu - View commit details
-
Copy full SHA for 84cd076 - Browse repository at this point
Copy the full SHA 84cd076View commit details
Commits on Mar 19, 2024
-
Add nullability info to
LayoutBinding.cs
Context: dotnet#8529 (comment) When building a project that uses layout bindings, multiple nullability warnings are emitted from `LayoutBinding.cs`: …/LayoutBinding.cs(16,98): warning CS8625: Cannot convert null literal to non-nullable reference type. …/LayoutBinding.cs(22,90): warning CS8625: Cannot convert null literal to non-nullable reference type. …/LayoutBinding.cs(16,13): warning CS8618: Non-nullable field 'boundView' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. …/LayoutBinding.cs(22,13): warning CS8618: Non-nullable field 'boundActivity' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. …/LayoutBinding.cs(35,11): warning CS8600: Converting null literal or possible null value to non-nullable type. …/LayoutBinding.cs(37,11): warning CS8600: Converting null literal or possible null value to non-nullable type. …/LayoutBinding.cs(79,56): warning CS8602: Dereference of a possibly null reference. …/LayoutBinding.cs(79,56): warning CS8603: Possible null reference return. …/LayoutBinding.cs(79,56): warning CA1422: This call site is reachable on: 'Android' 21.0 and later. 'Activity.FragmentManager' is obsoleted on: 'Android' 28.0 and later. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1422) …/LayoutBinding.cs(79,56): warning CA1422: This call site is reachable on: 'Android' 21.0 and later. 'FragmentManager.FindFragmentById<T>(int)' is obsoleted on: 'Android' 28.0 and later (This class is obsoleted in this android platform). (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1422) Update `LayoutBinding.cs` to include nullability annotations. Now, no warnings are emitted when `$(AndroidGenerateLayoutBindings)`=true.
Configuration menu - View commit details
-
Copy full SHA for c6b506d - Browse repository at this point
Copy the full SHA c6b506dView commit details
Commits on Mar 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for cc42d79 - Browse repository at this point
Copy the full SHA cc42d79View commit details -
The `SuccessfulAndroidXApp` test was failing, as it asserted no warnings, yet it had warnings: …\LayoutBinding.cs(61,56): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. …\LayoutBinding.cs(61,72): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. …\LayoutBinding.cs(79,76): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. …\LayoutBinding.cs(79,95): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. …\LayoutBinding.cs(88,86): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. …\LayoutBinding.cs(88,105): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. …\LayoutBinding.cs(16,74): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. …\LayoutBinding.cs(22,66): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. …\LayoutBinding.cs(12,11): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. …\LayoutBinding.cs(13,7): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. …\LayoutBinding.cs(14,30): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. …\LayoutBinding.cs(33,5): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Slap on a `#nullable enable` so that we can reliably use nullable reference types within `LayoutBinding.cs`.
Configuration menu - View commit details
-
Copy full SHA for 6d0f448 - Browse repository at this point
Copy the full SHA 6d0f448View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.