Skip to content

Commit

Permalink
Merge pull request #2526 from getsentry/rel/8.11.2
Browse files Browse the repository at this point in the history
release prep v8.11.2
  • Loading branch information
vaind authored Dec 20, 2024
2 parents 1cc9547 + 7802947 commit 19a9adb
Show file tree
Hide file tree
Showing 5 changed files with 363 additions and 273 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#7190)
- [diff](https://github.com/getsentry/sentry-java/compare/7.18.1...7.19.0)

## 8.11.2

### Changes

- Windows & Linux native crash handlers: add `SENTRY_NATIVE_BACKEND` env var with default setting of `none`. ([#2522](https://github.com/getsentry/sentry-dart/pull/2522))
Native crash reporting support with `sentry-native`'s `crashpad` was added in v8.11.0 and has caused build-time issues
for some users, because it required newer build tools (newer versions of MSVC/Clang/GCC) than base Flutter SDK.
This broke the ability to build the app for some users compiling Windows and Linux apps with older toolchains.

To avoid this issue, we're disabling the native crash handling by default for Linux and Windows for now.
You can enable it manually by setting the `SENTRY_NATIVE_BACKEND=crashpad` environment variable before running `flutter build`.
You can read more about available backends that fit your use-case in [sentry-native docs](https://docs.sentry.io/platforms/native/configuration/backends/).

We plan to change the default back to `crashpad` in the next major SDK release.

## 8.11.1

### Improvements
Expand Down
2 changes: 2 additions & 0 deletions flutter/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# the plugin to fail to compile for some customers of the plugin.
cmake_minimum_required(VERSION 3.10)

set(SENTRY_BACKEND "crashpad" CACHE STRING "The sentry backend responsible for reporting crashes" FORCE)

include("${CMAKE_CURRENT_SOURCE_DIR}/../sentry-native/sentry-native.cmake")

# Even though sentry_flutter doesn't actually provide a useful plugin, we need to accommodate the Flutter tooling.
Expand Down
29 changes: 20 additions & 9 deletions flutter/sentry-native/sentry-native.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ load_cache("${CMAKE_CURRENT_LIST_DIR}" READ_WITH_PREFIX SENTRY_NATIVE_ repo vers
message(STATUS "Fetching Sentry native version: ${SENTRY_NATIVE_version} from ${SENTRY_NATIVE_repo}")

set(SENTRY_SDK_NAME "sentry.native.flutter" CACHE STRING "The SDK name to report when sending events." FORCE)
set(SENTRY_BACKEND "crashpad" CACHE STRING "The sentry backend responsible for reporting crashes" FORCE)
set(SENTRY_BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" FORCE)

# Note: the backend is also set in linux/CMakeLists.txt and windows/CMakeLists.txt. This overwrites those if user sets an env var.
if("$ENV{SENTRY_NATIVE_BACKEND}" STREQUAL "")
# Until sentry-dart v9, we disable native backend by default.
set(SENTRY_BACKEND "none" CACHE STRING "The sentry backend responsible for reporting crashes" FORCE)
else()
set(SENTRY_BACKEND $ENV{SENTRY_NATIVE_BACKEND} CACHE STRING "The sentry backend responsible for reporting crashes" FORCE)
endif()

include(FetchContent)
FetchContent_Declare(
sentry-native
Expand All @@ -17,15 +24,19 @@ FetchContent_MakeAvailable(sentry-native)

# List of absolute paths to libraries that should be bundled with the plugin.
# This list could contain prebuilt libraries, or libraries created by an external build triggered from this build file.
if(WIN32)
set(sentry_flutter_bundled_libraries
$<TARGET_FILE:crashpad_handler>
$<TARGET_FILE:crashpad_wer>
PARENT_SCOPE)
if(SENTRY_BACKEND STREQUAL "crashpad")
if(WIN32)
set(sentry_flutter_bundled_libraries
$<TARGET_FILE:crashpad_handler>
$<TARGET_FILE:crashpad_wer>
PARENT_SCOPE)
else()
set(sentry_flutter_bundled_libraries
$<TARGET_FILE:crashpad_handler>
PARENT_SCOPE)
endif()
else()
set(sentry_flutter_bundled_libraries
$<TARGET_FILE:crashpad_handler>
PARENT_SCOPE)
set(sentry_flutter_bundled_libraries "" PARENT_SCOPE)
endif()

# `*_plugin` is the name of the plugin library as expected by flutter.
Expand Down
Loading

0 comments on commit 19a9adb

Please sign in to comment.