From 752e1cbc28cf43cd42c42c408d0ebc5c96f0c11d Mon Sep 17 00:00:00 2001 From: Ivan Dlugos <6349682+vaind@users.noreply.github.com> Date: Wed, 16 Oct 2024 13:14:49 +0200 Subject: [PATCH] chore: temporarily disable sentry-native Windows integration (#2363) * chore: temporarily disable sentry-native Windows integration * disable native test * changelog entry --- CHANGELOG.md | 6 ++++++ dart/lib/src/platform_checker.dart | 7 +++---- flutter/test/sentry_flutter_test.dart | 9 +++++++-- flutter/test/sentry_native/sentry_native_test.dart | 5 ++++- flutter/windows/CMakeLists.txt | 13 +++++++++---- flutter/windows/temp.cpp | 1 + 6 files changed, 30 insertions(+), 11 deletions(-) create mode 100644 flutter/windows/temp.cpp diff --git a/CHANGELOG.md b/CHANGELOG.md index b8b77fcc5c..56ab7aa518 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Fixes + +- Temporarily disable Windows native error & obfuscation support ([#2363](https://github.com/getsentry/sentry-dart/pull/2363)) + ## 8.10.0-beta.1 ### Features diff --git a/dart/lib/src/platform_checker.dart b/dart/lib/src/platform_checker.dart index 334d73f43f..f47933a268 100644 --- a/dart/lib/src/platform_checker.dart +++ b/dart/lib/src/platform_checker.dart @@ -44,10 +44,9 @@ class PlatformChecker { // the OS checks return true when the browser runs on the checked platform. // Example: platform.isAndroid return true if the browser is used on an // Android device. - return platform.isAndroid || - platform.isIOS || - platform.isMacOS || - platform.isWindows; + return platform.isAndroid || platform.isIOS || platform.isMacOS; + // Temporarily disabled due to https://github.com/getsentry/sentry-dart-plugin/issues/270 + // platform.isWindows } static bool _isWebWithWasmSupport() { diff --git a/flutter/test/sentry_flutter_test.dart b/flutter/test/sentry_flutter_test.dart index 233f4539bf..f9513e1adf 100644 --- a/flutter/test/sentry_flutter_test.dart +++ b/flutter/test/sentry_flutter_test.dart @@ -249,8 +249,11 @@ void main() { hasFileSystemTransport: false, ); + // Temporarily disabled due to https://github.com/getsentry/sentry-dart-plugin/issues/270 + // testScopeObserver( + // options: sentryFlutterOptions, expectedHasNativeScopeObserver: true); testScopeObserver( - options: sentryFlutterOptions, expectedHasNativeScopeObserver: true); + options: sentryFlutterOptions, expectedHasNativeScopeObserver: false); testConfiguration( integrations: integrations, @@ -271,7 +274,9 @@ void main() { beforeIntegration: WidgetsFlutterBindingIntegration, afterIntegration: OnErrorIntegration); - expect(SentryFlutter.native, isNotNull); + // Temporarily disabled due to https://github.com/getsentry/sentry-dart-plugin/issues/270 + // expect(SentryFlutter.native, isNotNull); + expect(SentryFlutter.native, isNull); expect(Sentry.currentHub.profilerFactory, isNull); }, testOn: 'vm'); diff --git a/flutter/test/sentry_native/sentry_native_test.dart b/flutter/test/sentry_native/sentry_native_test.dart index 3b720df7af..1d4cfdd5a1 100644 --- a/flutter/test/sentry_native/sentry_native_test.dart +++ b/flutter/test/sentry_native/sentry_native_test.dart @@ -12,4 +12,7 @@ import 'sentry_native_test_web.dart' // Defining main() here allows us to manually run/debug from VSCode. // If we didn't need that, we could just `export` above. -void main() => actual.main(); + +// Temporarily disabled due to https://github.com/getsentry/sentry-dart-plugin/issues/270 +// void main() => actual.main(); +void main() {} diff --git a/flutter/windows/CMakeLists.txt b/flutter/windows/CMakeLists.txt index f992a75fdb..ce2afa94c7 100644 --- a/flutter/windows/CMakeLists.txt +++ b/flutter/windows/CMakeLists.txt @@ -4,8 +4,13 @@ # customers of the plugin. cmake_minimum_required(VERSION 3.14) -include("${CMAKE_CURRENT_SOURCE_DIR}/../sentry-native/sentry-native.cmake") +# Temporarily disabled due to https://github.com/getsentry/sentry-dart-plugin/issues/270 +# include("${CMAKE_CURRENT_SOURCE_DIR}/../sentry-native/sentry-native.cmake") -# Even though sentry_flutter doesn't actually provide a useful plugin, we need to accomodate the Flutter tooling. -# sentry_flutter/sentry_flutter_plugin.h is included by the flutter-tool generated plugin registrar: -target_include_directories(sentry INTERFACE ${CMAKE_CURRENT_LIST_DIR}) +# # Even though sentry_flutter doesn't actually provide a useful plugin, we need to accomodate the Flutter tooling. +# # sentry_flutter/sentry_flutter_plugin.h is included by the flutter-tool generated plugin registrar: +# target_include_directories(sentry INTERFACE ${CMAKE_CURRENT_LIST_DIR}) + +# Temp code: replace with the previous code when sentry-native is enabled +add_library(sentry_flutter_plugin temp.cpp) +target_include_directories(sentry_flutter_plugin INTERFACE ${CMAKE_CURRENT_LIST_DIR}) diff --git a/flutter/windows/temp.cpp b/flutter/windows/temp.cpp new file mode 100644 index 0000000000..fc4c966914 --- /dev/null +++ b/flutter/windows/temp.cpp @@ -0,0 +1 @@ +// Temp code, see cmakelists.txt for more info