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

Fix Xamarin.Jetbrains.Annotations conflicting with Jetbrains.Annotations #6279

Merged

Conversation

Susko3
Copy link
Member

@Susko3 Susko3 commented May 7, 2024

This conflict was most noticeable when using [NotNull] in osu! ppy/osu@9c22fa3.

This doesn't fix the conflict in osu.Framework.Android, but it does fix it for downstream projects. If a fix is needed for o!f, PackageReference Aliases can be used.

I've tested osu! with a local framework checkout and with a local package, and it works fine without the workaround.


The namespace conflict can be tested with this diff (compile error on master, works fine with this PR):

diff --git a/osu.Framework.Tests.Android/TestGameActivity.cs b/osu.Framework.Tests.Android/TestGameActivity.cs
index 19851817f..8dfae3995 100644
--- a/osu.Framework.Tests.Android/TestGameActivity.cs
+++ b/osu.Framework.Tests.Android/TestGameActivity.cs
@@ -2,6 +2,7 @@
 // See the LICENCE file in the repository root for full licence text.
 
 using Android.App;
+using JetBrains.Annotations;
 using osu.Framework.Android;
 
 namespace osu.Framework.Tests.Android
@@ -9,6 +10,7 @@ namespace osu.Framework.Tests.Android
     [Activity(ConfigurationChanges = DEFAULT_CONFIG_CHANGES, Exported = true, LaunchMode = DEFAULT_LAUNCH_MODE, MainLauncher = true)]
     public class TestGameActivity : AndroidGameActivity
     {
+        [NotNull]
         protected override Game CreateGame()
             => new VisualTestGame();
     }

…ations`

This conflict was most noticeable when using `[NotNull]` in osu!
ppy/osu@9c22fa3

This doesn't fix the conflict in o!f.Android, but it does fix it for downstream projects.
If a fix is needed for o!f, PackageReference Aliases can be used.

More info: xamarin/AndroidX#885
@Susko3 Susko3 force-pushed the fix-xamarin-jetbrains-annotations-conflicts branch from 1ae78c8 to 375a879 Compare May 7, 2024 01:55
@smoogipoo smoogipoo merged commit 004fae4 into ppy:master May 7, 2024
21 checks passed
@Susko3 Susko3 deleted the fix-xamarin-jetbrains-annotations-conflicts branch May 7, 2024 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants