Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ jobs:
with:
name: package-release

- name: Check plugin platform scopes
shell: pwsh
run: ./test/Scripts.Tests/test-plugin-platforms.ps1

- name: Check snapshot
id: snapshot-check
shell: pwsh
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ package-dev/Plugins/Windows/SentryNative~/*
package-dev/Plugins/Linux/Sentry~/*
package-dev/Plugins/Linux/SentryNative~/*

# macOS SDK files
package-dev/Plugins/macOS/Sentry~/*
package-dev/Plugins/macOS/SentryNative~/*

# CLI
package-dev/Editor/sentry-cli

Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ Read only guide relevant to task. Do not import all guides at startup.
## Commits

- Use direct, capitalized commit subjects without conventional-commit prefixes.
- Include the committing agent's own `Co-Authored-By` attribution when a commit is requested.
- Do not add agent attribution trailers such as `Co-Authored-By`.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,17 @@

- When targeting Windows using the `Mono` scripting backend the SDK now correctly loads `sentry-native` to capture native crashes. ([#2842](https://github.com/getsentry/sentry-unity/pull/2842))
- Fixed a `NoSuchFieldError` during initialization on Android when setting the `sample rate`. ([#2838](https://github.com/getsentry/sentry-unity/issues/2838))
- Individual assemblies and plugins are now scoped to the platforms that use them. ([#2848](https://github.com/getsentry/sentry-unity/pull/2848))
- When targeting Nintendo Switch or Switch 2 the SDK no longer fails to initialize the native layer at runtime. The respective stubs are now written to `Assets/Plugins/Sentry` so the SDK can enable and disable them before the build starts. ([#2849](https://github.com/getsentry/sentry-unity/pull/2849))

### Dependencies

- Bump Native SDK from v0.16.5 to v0.16.6 ([#2839](https://github.com/getsentry/sentry-unity/pull/2839))
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#0166)
- [diff](https://github.com/getsentry/sentry-native/compare/0.16.5...0.16.6)
- Bump Cocoa SDK from v9.27.0 to v9.28.0 ([#2840](https://github.com/getsentry/sentry-unity/pull/2840))
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#9280)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/9.27.0...9.28.0)
- Bump Java SDK from v8.55.0 to v8.56.0 ([#2841](https://github.com/getsentry/sentry-unity/pull/2841))
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8560)
- [diff](https://github.com/getsentry/sentry-java/compare/8.55.0...8.56.0)
Expand Down
5 changes: 4 additions & 1 deletion docs/agent-guides/platform-native.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ Experimental native modes raise minimum shutdown timeout to 10 seconds.
## Console Plugins

- PS5/Xbox libraries are user-supplied: `Assets/Plugins/Sentry/{PS5,XSX,XB1}/`.
- Switch needs user-supplied static `libsentry.a` and `libzstd.a`; none uses shipped no-op stubs, partial installation is an error.
- Switch needs user-supplied static `libsentry.a` and `libzstd.a` per target in `Assets/Plugins/Sentry/{Switch,Switch2}`. It is the only platform that binds `__Internal`, so a missing library is a link error, which is why it alone ships stubs.
- `SwitchNativeStub` copies `Plugins/Switch/SentryStub~/sentry_native_stubs.c` into the user's plugin directory while the libraries are missing and deletes it once they arrive. Copying is limited to the active build target; deletion is not, because a stale stub shadows the libraries beside it.
- The template lives behind a `~` so the AssetDatabase never imports it. Importer settings cannot be written to an immutable package, so it must not become a package asset.
- A copy whose content differs from the template, line endings normalized away, is rewritten from it. That is what refreshes already-copied stubs on upgrade, so editing the template is all a stub change takes. `SwitchNativeStubTests.Stub_ContainsEverySwitchNativeBinding` keeps the template covering every `__Internal` entry point.
- Console and Android assemblies compile separately with platform defines. Chained `Csc` targets in `Sentry.Unity.Native.csproj`.

## Tests
Expand Down
2 changes: 1 addition & 1 deletion modules/sentry-cocoa
Submodule sentry-cocoa updated 417 files
2 changes: 1 addition & 1 deletion modules/sentry-native
Submodule sentry-native updated 58 files
+3 −2 .github/workflows/ci.yml
+3 −3 .github/workflows/codeql.yml
+65 −0 .github/workflows/contrib.yml
+8 −2 .github/workflows/docker.yml
+5 −0 .github/workflows/e2e-test.yml
+54 −0 CHANGELOG.md
+18 −9 CMakeLists.txt
+4 −3 Makefile
+25 −0 cmake/utils.cmake
+25 −2 include/sentry.h
+1 −1 ndk/gradle.properties
+83 −0 scripts/contrib.py
+8 −2 scripts/install-llvm-mingw.ps1
+4 −1 scripts/install-zlib.ps1
+18 −67 src/backends/native/minidump/sentry_minidump_linux.c
+290 −16 src/backends/native/sentry_crash_daemon.c
+51 −15 src/backends/sentry_backend_native.c
+20 −7 src/modulefinder/sentry_modulefinder_apple.c
+13 −9 src/modulefinder/sentry_modulefinder_linux.c
+48 −16 src/modulefinder/sentry_modulefinder_windows.c
+15 −11 src/sentry_core.c
+0 −8 src/sentry_core.h
+3 −1 src/sentry_cpu_relax.h
+28 −0 src/sentry_elf.h
+9 −9 src/sentry_envelope.c
+63 −34 src/sentry_json.c
+2 −2 src/sentry_options.c
+2 −1 src/sentry_os.c
+3 −1 src/sentry_session_replay.h
+3 −0 src/sentry_slice.c
+2 −2 src/sentry_tracing.c
+11 −1 src/sentry_unix_pageallocator.c
+2 −2 src/sentry_utils.c
+20 −0 src/sentry_uuid.c
+7 −0 src/sentry_uuid.h
+6 −0 src/sentry_value.c
+10 −9 src/session_replay/sentry_session_replay.c
+3 −1 src/symbolizer/sentry_symbolizer_windows.c
+1 −1 tests/__init__.py
+1 −1 tests/assertions.py
+1 −1 tests/conditions.py
+2 −0 tests/fixtures/os_releases/malformed_quotes
+12 −0 tests/test_integration_http.py
+94 −2 tests/test_integration_native.py
+6 −0 tests/test_integration_stdout.py
+62 −0 tests/unit/test_concurrency.c
+2 −0 tests/unit/test_envelopes.c
+1 −0 tests/unit/test_failures.c
+36 −4 tests/unit/test_modulefinder.c
+1 −0 tests/unit/test_os.c
+8 −0 tests/unit/test_slice.c
+33 −0 tests/unit/test_tracing.c
+19 −0 tests/unit/test_uninit.c
+1 −0 tests/unit/test_utils.c
+27 −0 tests/unit/test_uuid.c
+34 −0 tests/unit/test_value.c
+6 −0 tests/unit/tests.inc
+17 −12 vendor/libunwind/CMakeLists.txt
10 changes: 5 additions & 5 deletions package-dev/Plugins/PS5/sentry_utils.c.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
/*
* Sentry Switch Stubs
*
* No-op stub implementations for sentry-native and Switch helper functions.
* These stubs are used when the user has not provided the actual sentry-switch
* native library, allowing the SDK to compile and run without native crash support.
* No-op stubs for the sentry-switch bindings. sentry-switch is distributed under NDA, so without
* them the player fails to link for anyone who does not have it.
*
* When the real sentry-switch library is provided by the user at:
* Assets/Plugins/Sentry/Switch/libsentry.a
* Assets/Plugins/Sentry/Switch/SentrySwitchHelpers.cpp
* `SwitchNativeStub` copies this file into the user's project while the real libraries are missing.
* Edit the original here; a copy that differs from it is rewritten from this file.
*
* This stub file will be automatically disabled by the build preprocessor,
* and the real library will be linked instead.
*
* All functions here are no-ops that return safe default values.
* The SDK will appear to initialize successfully, but native features
* (crash reporting, native scope sync) will silently do nothing.
* Managed Sentry features continue to work normally.
* `sentry_init` returns failure so `SentryNativeSwitch` reports native support as unavailable
* instead of silently reporting nothing. Managed Sentry features are unaffected.
*/

#include <stddef.h>
Expand Down Expand Up @@ -49,9 +42,10 @@ int sentry_init(void* options)
return -1;
}

void sentry_close(void)
int sentry_close(void)
{
/* No-op */
/* Success, matching sentry-native's `int sentry_close(void)` */
return 0;
}

/*
Expand Down Expand Up @@ -251,9 +245,11 @@ sentry_value_t sentry_value_get_by_key(sentry_value_t value, const char* key)
return SENTRY_VALUE_NULL;
}

void sentry_value_decref(sentry_value_t value)
int sentry_value_decref(sentry_value_t value)
{
/* Refcount reached zero, matching sentry-native's `int sentry_value_decref(sentry_value_t)` */
(void)value;
return 0;
}

/*
Expand Down Expand Up @@ -352,9 +348,10 @@ int sentry_clear_crashed_last_run(void)
return 0;
}

void sentry_reinstall_backend(void)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could it be a problem that SentryNativeBridge's declaration of sentry_reinstall_backend still returns void instead of int?

int sentry_reinstall_backend(void)
{
/* No-op */
/* Success, matching sentry-native's `int sentry_reinstall_backend(void)` */
return 0;
}

void sentry_app_hang_heartbeat(void)
Expand Down
2 changes: 1 addition & 1 deletion package-dev/Plugins/iOS/SentryNativeBridge.m.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package-dev/Plugins/iOS/SentryNativeBridgeNoOp.m.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package-dev/Plugins/macOS/SentryNativeBridge.m.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package-dev/Runtime/Sentry.Unity.iOS.dll.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions scripts/unity-versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"changeset": "dacc44548933"
},
"6000.3": {
"version": "6000.3.23f1",
"changeset": "09d2ecc7fb28"
"version": "6000.3.24f1",
"changeset": "4e7b9b5b6244"
},
"6000.5": {
"version": "6000.5.0f1",
Expand Down
Loading
Loading