Skip to content

Conversation

@Flash0ver
Copy link
Member

@Flash0ver Flash0ver commented Apr 23, 2025

follow-up to #4107

  • Rename unreleased MSBuild property from DisableSentryNative to SentryNative
    • to keep all Sentry-related MSBuild properties prefixed with Sentry..
  • Change the value to opt-out from true to false|disable
    • similar to SentryImplicitUsings, also an opt-out
    • opposite to ImplicitUsings, which is an opt-in
  • Keep disabling native libraries as explicit opt-out

@Flash0ver Flash0ver self-assigned this Apr 23, 2025
#if NET9_0_OR_GREATER
// FeatureSwitchDefinition should help with trimming disabled code.
// This way, `SentryNative.IsEnabled` should be treated as a compile-time constant for trimmed apps.
// This way, `Sentry.Native.IsEnabled` should be treated as a compile-time constant for trimmed apps.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// This way, `Sentry.Native.IsEnabled` should be treated as a compile-time constant for trimmed apps.
// This way, `SentryNative.IsEnabled` should be treated as a compile-time constant for trimmed apps.

It's internal static class SentryNative

Copy link
Member Author

Choose a reason for hiding this comment

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

ah ... it's referring to the property name, not the switch name ... my bad ... reverted

Copy link
Collaborator

@jamescrosswell jamescrosswell left a comment

Choose a reason for hiding this comment

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

LGTM

@Flash0ver Flash0ver merged commit 084e3b4 into main Apr 23, 2025
31 checks passed
@Flash0ver Flash0ver deleted the make-native-lib-actually-optional-rename-property branch April 23, 2025 09:57
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.

3 participants