-
-
Notifications
You must be signed in to change notification settings - Fork 226
fix: Don't load SentryNative on unsupported platforms #4347
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7117e79 to
b0fcac4
Compare
Using 32-bit win-x86 and linux-arm
d33ddb8 to
63c5f08
Compare
63c5f08 to
f38be78
Compare
jamescrosswell
approved these changes
Jul 18, 2025
Collaborator
jamescrosswell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks @jpnurmi !
Flash0ver
approved these changes
Jul 18, 2025
Member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @jpnurmi for the many improvements around CI and Native
I got 4 non-blocking comments
src/Sentry/Platforms/Native/buildTransitive/Sentry.Native.targets
Outdated
Show resolved
Hide resolved
Flash0ver
reviewed
Jul 18, 2025
This was referenced Jul 28, 2025
This was referenced Aug 18, 2025
This was referenced Aug 27, 2025
This was referenced Sep 8, 2025
This was referenced Sep 15, 2025
This was referenced Oct 2, 2025
This was referenced Oct 13, 2025
This was referenced Oct 20, 2025
This was referenced Nov 3, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
TLDR; default
Sentry.Native.IsEnabledto false for unsupported Native AOT platforms.The existing
integration-test/aot.Tests.ps1works great for testing unsupported platforms with a minor tweak to allow specifying the desired targetRuntimeIdentifierin the environment. It only testsdotnet publishfor a minimal Sentry console app, and that the compiled binary executes ok (without capturing any native exceptions). The original purpose was to test thatlibsentry-native.adoesn't have problematic dependencies (libcurl.so), but the same integration test works just as well for testing that sentry-dotnet doesn't try to load a non-existentlibsentry-native.so.Without the newly introduced changes that make
Sentry.Native.IsEnableddefault to false for unsupported Native AOT platforms, the test would produce such failures:win-x86(Windows 32-bit)linux-arm(Linux ARM 32-bit)Note: These two platforms were chosen because both are straightforward to set up for testing. If either platform becomes supported in the future, the respective matrix item can be removed.
Resolves: #4343