fix: Don't load SentryNative on unsupported platforms#4347
Merged
Conversation
jpnurmi
force-pushed
the
fix/unsupported-native
branch
6 times, most recently
from
July 16, 2025 14:38
7117e79 to
b0fcac4
Compare
Using 32-bit win-x86 and linux-arm
jpnurmi
force-pushed
the
fix/unsupported-native
branch
2 times, most recently
from
July 17, 2025 08:44
d33ddb8 to
63c5f08
Compare
jpnurmi
force-pushed
the
fix/unsupported-native
branch
from
July 17, 2025 08:50
63c5f08 to
f38be78
Compare
jpnurmi
marked this pull request as ready for review
July 17, 2025 10:12
jamescrosswell
approved these changes
Jul 18, 2025
jamescrosswell
left a comment
Collaborator
There was a problem hiding this comment.
LGTM - thanks @jpnurmi !
Flash0ver
approved these changes
Jul 18, 2025
Flash0ver
reviewed
Jul 18, 2025
This was referenced Jul 28, 2025
This was referenced May 12, 2026
This was referenced May 25, 2026
This was referenced Jun 2, 2026
This was referenced Jun 19, 2026
This was referenced Jun 29, 2026
This was referenced Jul 10, 2026
This was referenced Jul 18, 2026
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
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