-
-
Notifications
You must be signed in to change notification settings - Fork 220
Add DisableSentryNative
build property
#4107
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
Add DisableSentryNative
build property
#4107
Conversation
DisableSentryNative
build parameter
DisableSentryNative
build parameterDisableSentryNative
build property
@maxkatz6 the PR where @vaind added Your code is looking at a couple of different scenarios/variants within that, I imagine (when it's enabled/disabled). |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4107 +/- ##
==========================================
- Coverage 75.73% 73.58% -2.15%
==========================================
Files 357 445 +88
Lines 13466 16061 +2595
Branches 2671 3179 +508
==========================================
+ Hits 10198 11819 +1621
- Misses 2593 3425 +832
- Partials 675 817 +142 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Thank you so much for the PR @maxkatz6 ❤️
This PR adds a new
DisableSentryNative
build property, allowing to opt-out from linking and using Sentry.Native on .NET 8+ builds. By default,DisableSentryNative
is false, so old behavior is kept unchanged.Two main changes of this PR:
DirectPInvoke
/NativeLibrary
are only set whenDisableSentryNative
is false.SentryNative.IsAvailable
returns false, ifDisableSentryNative
was set to true.Runtime switches (
RuntimeHostConfigurationOption
andAppContext.TryGetSwitch
) were used to pass build property to the runtime library.FeatureSwitchDefinition
used should make this switch into a compile-time variable.Closes #4102
NOTE: while it should work, I haven't tested the build yet. Need to figure out how to prepare a local build with native bits and everything included.