Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump to xamarin/Java.Interop/main@f8d77fa (#7638)
Context: 4da2792 Context: dotnet/java-interop@d3ea180 Context: dotnet/java-interop@15c8879 Changes: dotnet/java-interop@149d70f...f8d77fa * dotnet/java-interop@f8d77faf: [generator] Better support deprecated property getter/setters. (dotnet/java-interop#1062) * dotnet/java-interop@5e6209ea: [generator] Obsolete&SupportedOSPlatform attributes on enum members (dotnet/java-interop#1066) * dotnet/java-interop@15c88797: [generator] Use decl type's @deprecated-since if < member's (dotnet/java-interop#1068) * dotnet/java-interop@525a45d5: [Java.Interop.Dynamic-Tests] Use Microsoft.CSharp NuGet package (dotnet/java-interop#1067) Background: member deprecations can be "historically weird" in Android. For example, in API-21 [`android/app/ActionBar.TabListener`][0] was deprecated: @deprecated /* partial */ interface TabListener { void onTabReselected(ActionBar.Tab tab, FragmentTransaction ft); // … } The type being deprecated means that its members are *implicitly* deprecated. In API-29 the members were *explicitly* deprecated: @deprecated /* partial */ interface TabListener { @deprecated void onTabReselected(ActionBar.Tab tab, FragmentTransaction ft); // … } Before dotnet/java-interop@d3ea180c, this resulted in the binding: [Obsolete] partial interface ITabListener { [Obsolete] void OnTabReselected(ActionBar.Tab? tab, FragmentTransaction? ft); // … } Commit dotnet/java-interop@d3ea180c added support for `[ObsoletedOSPlatform]` to `generator`, which *changed* the binding to: [Obsolete] // because it was deprecated in our min-supported API-21 partial interface ITabListener { [ObsoletedOSPlatform ("android29.0")] void OnTabReselected(ActionBar.Tab? tab, FragmentTransaction? ft); // … } This resulted in *lots* of changes in commit 4da2792 to `tests/api-compatibility/acceptable-breakages-vReference-net7.0.txt` because `[Obsolete]` was were replaced by `[ObsoletedOSPlatform]`: CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'Android.App.ActionBar.ITabListener.OnTabReselected(Android.App.ActionBar.Tab, Android.App.FragmentTransaction)' in the contract but not the implementation Commit dotnet/java-interop@15c88797 updates type members to have the same deprecation status as their declaring type, when the member was deprecated *after* the type was deprecated. This means we *now* bind `ITabListener` as: [Obsolete] // because it was deprecated in our min-supported API-21 partial interface ITabListener { [Obsolete] void OnTabReselected(ActionBar.Tab? tab, FragmentTransaction? ft); // … } which matches the state of things pre- dotnet/java-interop@d3ea180c, which means we no longer need to ignore all those `CannotRemoveAttribute` messages. dotnet/java-interop@15c88797 thus "unintentionally partially reverts" 4da2792 (yay?), simply because the prior state of affairs in which a member was deprecated *after* the declaring type, while valid, didn't make any sense. Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jonathan Pobst <[email protected]> [0]: https://developer.android.com/reference/android/app/ActionBar.TabListener
- Loading branch information