Skip to content

Commit 1f459af

Browse files
web-flowgithub-actions[bot]
authored andcommitted
chore: update packages/flutter/scripts/update-native.sh to 0.12.2
1 parent f872f8e commit 1f459af

File tree

3 files changed

+50
-52
lines changed

3 files changed

+50
-52
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
### Dependencies
6+
7+
- Bump Native SDK from v0.10.0 to v0.12.2 ([#3388](https://github.com/getsentry/sentry-dart/pull/3388))
8+
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#0122)
9+
- [diff](https://github.com/getsentry/sentry-native/compare/0.10.0...0.12.2)
10+
311
## 9.9.1
412

513
### Fixes

packages/flutter/lib/src/native/c/binding.dart

Lines changed: 41 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,16 @@ class SentryNative {
131131
_value_new_objectPtr.asFunction<sentry_value_u Function()>();
132132

133133
/// Returns the type of the value passed.
134-
sentry_value_type_t value_get_type(
134+
int value_get_type(
135135
sentry_value_u value,
136136
) {
137-
return sentry_value_type_t.fromValue(_value_get_type(
137+
return _value_get_type(
138138
value,
139-
));
139+
);
140140
}
141141

142142
late final _value_get_typePtr =
143-
_lookup<ffi.NativeFunction<ffi.UnsignedInt Function(sentry_value_u)>>(
143+
_lookup<ffi.NativeFunction<ffi.Int32 Function(sentry_value_u)>>(
144144
'sentry_value_get_type');
145145
late final _value_get_type =
146146
_value_get_typePtr.asFunction<int Function(sentry_value_u)>();
@@ -206,7 +206,7 @@ class SentryNative {
206206
late final _value_append = _value_appendPtr
207207
.asFunction<int Function(sentry_value_u, sentry_value_u)>();
208208

209-
/// Looks up a value in a map by key. If missing a null value is returned.
209+
/// Looks up a value in a map by key. If missing, a null value is returned.
210210
/// The returned value is borrowed.
211211
sentry_value_u value_get_by_key(
212212
sentry_value_u value,
@@ -225,7 +225,7 @@ class SentryNative {
225225
late final _value_get_by_key = _value_get_by_keyPtr.asFunction<
226226
sentry_value_u Function(sentry_value_u, ffi.Pointer<ffi.Char>)>();
227227

228-
/// Looks up a value in a list by index. If missing a null value is returned.
228+
/// Looks up a value in a list by index. If missing, a null value is returned.
229229
/// The returned value is borrowed.
230230
sentry_value_u value_get_by_index(
231231
sentry_value_u value,
@@ -246,7 +246,7 @@ class SentryNative {
246246

247247
/// Returns the length of the given map or list.
248248
///
249-
/// If an item is not a list or map the return value is 0.
249+
/// If an item is not a list or map, the return value is 0.
250250
int value_get_length(
251251
sentry_value_u value,
252252
) {
@@ -612,8 +612,15 @@ class SentryNative {
612612
/// Sets the path to the crashpad handler if the crashpad backend is used.
613613
///
614614
/// The path defaults to the `crashpad_handler`/`crashpad_handler.exe`
615-
/// executable, depending on platform, which is expected to be present in the
616-
/// same directory as the app executable.
615+
/// executable in the same directory as the application executable.
616+
///
617+
/// Meaning if your application resides in
618+
///
619+
/// "C:\path\to\your\application.exe"
620+
///
621+
/// then the handler path will be set (by default) to
622+
///
623+
/// "C:\path\to\your\crashpad_handler.exe"
617624
///
618625
/// It is recommended that library users set an explicit handler path, depending
619626
/// on the directory/executable structure of their app.
@@ -656,15 +663,15 @@ class SentryNative {
656663
///
657664
/// It is recommended that users set an explicit absolute path, depending
658665
/// on their apps runtime directory. The path will be created if it does not
659-
/// exist, and will be resolved to an absolute path inside of `sentry_init`. The
666+
/// exist and will be resolved to an absolute path inside `sentry_init`. The
660667
/// directory should not be shared with other application data/configuration, as
661-
/// sentry-native will enumerate and possibly delete files in that directory. An
668+
/// sentry-native will list and possibly delete files in that directory. An
662669
/// example might be `$XDG_CACHE_HOME/your-app/sentry`
663670
///
664-
/// If no explicit path it set, sentry-native will default to `.sentry-native` in
671+
/// If no explicit path is set, sentry-native will default to `.sentry-native` in
665672
/// the current working directory, with no specific platform-specific handling.
666673
///
667-
/// `path` is assumed to be in platform-specific filesystem path encoding.
674+
/// `path` is assumed to be in a platform-specific filesystem path encoding.
668675
/// API Users on windows are encouraged to use
669676
/// `sentry_options_set_database_pathw` instead.
670677
void options_set_database_path(
@@ -688,8 +695,8 @@ class SentryNative {
688695

689696
/// Initializes the Sentry SDK with the specified options.
690697
///
691-
/// This takes ownership of the options. After the options have been set
692-
/// they cannot be modified any more.
698+
/// This takes ownership of the options. After the options have been set,
699+
/// they cannot be modified anymore.
693700
/// Depending on the configured transport and backend, this function might not be
694701
/// fully thread-safe.
695702
/// Returns 0 on success.
@@ -709,14 +716,14 @@ class SentryNative {
709716

710717
/// Shuts down the sentry client and forces transports to flush out.
711718
///
712-
/// Returns 0 on success.
719+
/// Returns the number of envelopes that have been dumped.
713720
///
714721
/// Note that this does not uninstall any crash handler installed by our
715722
/// backends, which will still process crashes after `sentry_close()`, except
716723
/// when using `crashpad` on Linux or the `inproc` backend.
717724
///
718725
/// Further note that this function will block the thread it was called from
719-
/// until the sentry background worker has finished its work or it timed out,
726+
/// until the sentry background worker has finished its work, or it timed out,
720727
/// whichever comes first.
721728
int close() {
722729
return _close();
@@ -901,48 +908,18 @@ class SentryNative {
901908
_sdk_namePtr.asFunction<ffi.Pointer<ffi.Char> Function()>();
902909
}
903910

904-
/// Type of a sentry value.
905-
enum sentry_value_type_t {
906-
SENTRY_VALUE_TYPE_NULL(0),
907-
SENTRY_VALUE_TYPE_BOOL(1),
908-
SENTRY_VALUE_TYPE_INT32(2),
909-
SENTRY_VALUE_TYPE_INT64(3),
910-
SENTRY_VALUE_TYPE_UINT64(4),
911-
SENTRY_VALUE_TYPE_DOUBLE(5),
912-
SENTRY_VALUE_TYPE_STRING(6),
913-
SENTRY_VALUE_TYPE_LIST(7),
914-
SENTRY_VALUE_TYPE_OBJECT(8);
915-
916-
final int value;
917-
const sentry_value_type_t(this.value);
918-
919-
static sentry_value_type_t fromValue(int value) => switch (value) {
920-
0 => SENTRY_VALUE_TYPE_NULL,
921-
1 => SENTRY_VALUE_TYPE_BOOL,
922-
2 => SENTRY_VALUE_TYPE_INT32,
923-
3 => SENTRY_VALUE_TYPE_INT64,
924-
4 => SENTRY_VALUE_TYPE_UINT64,
925-
5 => SENTRY_VALUE_TYPE_DOUBLE,
926-
6 => SENTRY_VALUE_TYPE_STRING,
927-
7 => SENTRY_VALUE_TYPE_LIST,
928-
8 => SENTRY_VALUE_TYPE_OBJECT,
929-
_ =>
930-
throw ArgumentError('Unknown value for sentry_value_type_t: $value'),
931-
};
932-
}
933-
934911
/// Represents a sentry protocol value.
935912
///
936913
/// The members of this type should never be accessed. They are only here
937914
/// so that alignment for the type can be properly determined.
938915
///
939916
/// Values must be released with `sentry_value_decref`. This lowers the
940-
/// internal refcount by one. If the refcount hits zero it's freed. Some
941-
/// values like primitives have no refcount (like null) so operations on
917+
/// internal refcount by one. If the refcount hits zero, it's freed. Some
918+
/// values like primitives have no refcount (like null), so operations on
942919
/// those are no-ops.
943920
///
944-
/// In addition values can be frozen. Some values like primitives are always
945-
/// frozen but lists and dicts are not and can be frozen on demand. This
921+
/// In addition, values can be frozen. Some values like primitives are always
922+
/// frozen, but lists and dicts are not and can be frozen on demand. This
946923
/// automatically happens for some shared values in the event payload like
947924
/// the module list.
948925
final class sentry_value_u extends ffi.Union {
@@ -953,6 +930,19 @@ final class sentry_value_u extends ffi.Union {
953930
external double _double;
954931
}
955932

933+
/// Type of sentry value.
934+
abstract class sentry_value_type_t {
935+
static const int SENTRY_VALUE_TYPE_NULL = 0;
936+
static const int SENTRY_VALUE_TYPE_BOOL = 1;
937+
static const int SENTRY_VALUE_TYPE_INT32 = 2;
938+
static const int SENTRY_VALUE_TYPE_INT64 = 3;
939+
static const int SENTRY_VALUE_TYPE_UINT64 = 4;
940+
static const int SENTRY_VALUE_TYPE_DOUBLE = 5;
941+
static const int SENTRY_VALUE_TYPE_STRING = 6;
942+
static const int SENTRY_VALUE_TYPE_LIST = 7;
943+
static const int SENTRY_VALUE_TYPE_OBJECT = 8;
944+
}
945+
956946
/// The Sentry Client Options.
957947
///
958948
/// See https://docs.sentry.io/platforms/native/configuration/

packages/flutter/sentry-native/CMakeCache.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Basically, this is a properties file we use both in CMake and update-deps.yml to update dependencies.
33

44
repo=https://github.com/getsentry/sentry-native
5-
version=0.10.0
5+
version=0.12.2

0 commit comments

Comments
 (0)