Skip to content

Relax Android Version Constraint & Only Include main dependencies we need - #4100

Closed
aritchie wants to merge 12 commits into
mainfrom
4095-fix_android_dependencies
Closed

aritchie wants to merge 12 commits into
mainfrom
4095-fix_android_dependencies

Conversation

@aritchie

Copy link
Copy Markdown
Contributor

Resolves #4095

  • Relaxes version constraint by setting min version needed and opening all forward updates (keep an eye on this moving forward)
  • Specifies the library we mainly need in AndroidX.Lifecycle.Process which transitively pulls in our dependencies on AX Core & Java8 Common

Comment thread src/Sentry.Bindings.Android/Sentry.Bindings.Android.csproj Outdated
@jamescrosswell
jamescrosswell marked this pull request as draft April 13, 2025 22:08
@aritchie
aritchie marked this pull request as ready for review April 16, 2025 23:04
@aritchie

Copy link
Copy Markdown
Contributor Author

@jamescrosswell might be good to release this as a beta so the nupkg gets fully packaged. I know the user that is waiting for this would be happy to help test as well

@aritchie aritchie changed the title Relax Android Version Constraint & Only Include main dependency we need Relax Android Version Constraint & Only Include main dependencies we need Apr 16, 2025
@jamescrosswell
jamescrosswell marked this pull request as draft April 16, 2025 23:46
@jamescrosswell

Copy link
Copy Markdown
Collaborator

We could test this PR by adding Microsoft.Maui.Essentials 9.0.50 to the Sentry.Samles.Maui.csproj. It wouldn't be a bullet proof test but if there are no diamond dependency warnings when we do that, it would indicate the dependency changes in this PR don't suffer from all the same constraints as our existing depdencies.

Ideally we'd have a system to identify and update these dependencies in the future as well. The dependencies we currently reference were identified by the Roslyn analysers (i.e. that's our current system). If there's a better way, we should document it (in this PR at least).

Comment thread CHANGELOG.md

### Fixes

- Relax Android Version Dependency and reference only Xamarin.AndroidX.Lifecycle.Process allowing other transitive libraries to pull our dependency versions forward ([#4100](https://github.com/getsentry/sentry-dotnet/pull/4100))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 🚫 The changelog entry seems to be part of an already released section ## 5.7.0.
    Consider moving the entry to the ## Unreleased section, please.

@jamescrosswell

Copy link
Copy Markdown
Collaborator

Just tested by adding Microsoft.Maui.Essentials 9.0.50 to the Sample app and unfortunately this PR doesn't resolve the issue.

That's not a massive surprise - there isn't even really a theoretical solution to the diamond dependency problem. At best, I think we'd be playing a game of whack-a-mol where we could get it going for some specific set of dependency versions but, at the same time, break it for another.

Ultimately, I don't believe this problem can be fixed in the Sentry SDK.

@jamescrosswell

Copy link
Copy Markdown
Collaborator

Turns out we actually have to bump to even higher versions of these dependencies in version 9.0.300 of the .NET SDK, so closing this PR.

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.

Package downgrades for Xamarin.AndroidX.Lifecycle.Common.Java8

3 participants