Skip to content

Commit 0a08454

Browse files
committed
Merge branch 'main' into feat/supabase
2 parents a7b8b28 + dfbe468 commit 0a08454

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+201
-119
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @krystofwoldrich @stefanosiano @buenaflor
1+
* @krystofwoldrich @stefanosiano @buenaflor @denrase

.github/workflows/min_version_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
with:
5656
flutter-version: "3.24.0"
5757

58-
- uses: ruby/setup-ruby@ca041f971d66735f3e5ff1e21cc13e2d51e7e535 # pin@v1.233.0
58+
- uses: ruby/setup-ruby@eaecf785f6a34567a6d97f686bbb7bccc1ac1e5c # pin@v1.237.0
5959
with:
6060
ruby-version: '3.1.2' # https://github.com/flutter/flutter/issues/109385#issuecomment-1212614125
6161

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
steps:
2020
- name: Get auth token
2121
id: token
22-
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
22+
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
2323
with:
2424
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
2525
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}

.github/workflows/testflight.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v4
1717
- uses: subosito/flutter-action@e938fdf56512cc96ef2f93601a5a40bde3801046 # [email protected]
1818
- run: xcodes select 15.0.1
19-
- uses: ruby/setup-ruby@ca041f971d66735f3e5ff1e21cc13e2d51e7e535 # pin@v1.233.0
19+
- uses: ruby/setup-ruby@eaecf785f6a34567a6d97f686bbb7bccc1ac1e5c # pin@v1.237.0
2020
with:
2121
ruby-version: '2.7.5'
2222
bundler-cache: true

CHANGELOG.md

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,40 @@
11
# Changelog
22

3-
## Unreleased
3+
## 9.0.0-RC.2
4+
5+
### Fixes
6+
7+
- Add `hasSize` guard when using a renderObject in `SentryUserInteractionWidget` ([#2946](https://github.com/getsentry/sentry-dart/pull/2946))
8+
9+
## 9.0.0-RC.1
10+
11+
### Fixes
12+
13+
- Fix feature flag model keys ([#2943](https://github.com/getsentry/sentry-dart/pull/2943))
14+
15+
## 9.0.0-RC
16+
17+
### Various fixes & improvements
18+
19+
- build(deps): bump ruby/setup-ruby from 1.233.0 to 1.237.0 (#2908) by @dependabot
20+
- build(deps): bump actions/create-github-app-token from 2.0.2 to 2.0.6 (#2909) by @dependabot
21+
22+
## 9.0.0-beta.2
23+
24+
### Fixes
25+
26+
- Errors caught by `OnErrorIntegration` should be unhandled by default ([#2901](https://github.com/getsentry/sentry-dart/pull/2901))
27+
- This will not affect grouping
28+
- This might affect crash-free rate
429

530
### Dependencies
631

7-
- Bump Android SDK from v8.9.0 to v8.11.0 ([#2899](https://github.com/getsentry/sentry-dart/pull/2899))
8-
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8110)
9-
- [diff](https://github.com/getsentry/sentry-java/compare/8.9.0...8.11.0)
32+
- Bump Android SDK from v8.9.0 to v8.11.1 ([#2899](https://github.com/getsentry/sentry-dart/pull/2899), [#2904](https://github.com/getsentry/sentry-dart/pull/2904))
33+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8111)
34+
- [diff](https://github.com/getsentry/sentry-java/compare/8.9.0...8.11.1)
35+
- Bump Cocoa SDK from v8.49.1 to v8.49.2 ([#2905](https://github.com/getsentry/sentry-dart/pull/2905))
36+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8492)
37+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.49.1...8.49.2)
1038

1139
## 9.0.0-beta.1
1240

@@ -483,7 +511,7 @@ This release fixes an issue where Cold starts can be incorrectly reported as War
483511
},
484512
appRunner: () => runApp(MyApp()),
485513
);
486-
} (error, stackTrace) {
514+
}, (error, stackTrace) {
487515
// Automatically sends errors to Sentry, no need to do any
488516
// captureException calls on your part.
489517
// On top of that, you can do your own custom stuff in this callback.
@@ -574,7 +602,7 @@ This release fixes an issue where Cold starts can be incorrectly reported as War
574602
},
575603
appRunner: () => runApp(MyApp()),
576604
);
577-
} (error, stackTrace) {
605+
}, (error, stackTrace) {
578606
// Automatically sends errors to Sentry, no need to do any
579607
// captureException calls on your part.
580608
// On top of that, you can do your own custom stuff in this callback.

dart/lib/src/feature_flags_integration.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class FeatureFlagsIntegration extends Integration<SentryOptions> {
1616
options.sdk.addIntegration('FeatureFlagsIntegration');
1717
}
1818

19-
FutureOr<void> addFeatureFlag(String name, bool value) async {
19+
FutureOr<void> addFeatureFlag(String flag, bool result) async {
2020
final flags =
2121
_hub?.scope.contexts[SentryFeatureFlags.type] as SentryFeatureFlags? ??
2222
SentryFeatureFlags(values: []);
@@ -26,11 +26,11 @@ class FeatureFlagsIntegration extends Integration<SentryOptions> {
2626
values.removeAt(0);
2727
}
2828

29-
final index = values.indexWhere((element) => element.name == name);
29+
final index = values.indexWhere((element) => element.flag == flag);
3030
if (index != -1) {
31-
values[index] = SentryFeatureFlag(name: name, value: value);
31+
values[index] = SentryFeatureFlag(flag: flag, result: result);
3232
} else {
33-
values.add(SentryFeatureFlag(name: name, value: value));
33+
values.add(SentryFeatureFlag(flag: flag, result: result));
3434
}
3535

3636
flags.values = values;

dart/lib/src/protocol/sentry_feature_flag.dart

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,45 +3,45 @@ import 'package:meta/meta.dart';
33
import 'access_aware_map.dart';
44

55
class SentryFeatureFlag {
6-
final String name;
7-
final bool value;
6+
final String flag;
7+
final bool result;
88

99
@internal
1010
final Map<String, dynamic>? unknown;
1111

1212
SentryFeatureFlag({
13-
required this.name,
14-
required this.value,
13+
required this.flag,
14+
required this.result,
1515
this.unknown,
1616
});
1717

1818
factory SentryFeatureFlag.fromJson(Map<String, dynamic> data) {
1919
final json = AccessAwareMap(data);
2020

2121
return SentryFeatureFlag(
22-
name: json['name'],
23-
value: json['value'],
22+
flag: json['flag'],
23+
result: json['result'],
2424
unknown: json.notAccessed(),
2525
);
2626
}
2727

2828
Map<String, dynamic> toJson() {
2929
return {
3030
...?unknown,
31-
'name': name,
32-
'value': value,
31+
'flag': flag,
32+
'result': result,
3333
};
3434
}
3535

3636
@Deprecated('Assign values directly to the instance.')
3737
SentryFeatureFlag copyWith({
38-
String? name,
39-
bool? value,
38+
String? flag,
39+
bool? result,
4040
Map<String, dynamic>? unknown,
4141
}) {
4242
return SentryFeatureFlag(
43-
name: name ?? this.name,
44-
value: value ?? this.value,
43+
flag: flag ?? this.flag,
44+
result: result ?? this.result,
4545
unknown: unknown ?? this.unknown,
4646
);
4747
}

dart/lib/src/sentry.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,8 @@ class Sentry {
365365
/// Returns `null` if performance is disabled in the options.
366366
static ISentrySpan? getSpan() => _hub.getSpan();
367367

368-
static Future<void> addFeatureFlag(String name, dynamic value) async {
369-
if (value is! bool) {
368+
static Future<void> addFeatureFlag(String flag, dynamic result) async {
369+
if (result is! bool) {
370370
return;
371371
}
372372

@@ -382,7 +382,7 @@ class Sentry {
382382
return;
383383
}
384384

385-
await featureFlagsIntegration.addFeatureFlag(name, value);
385+
await featureFlagsIntegration.addFeatureFlag(flag, result);
386386
}
387387

388388
@internal

dart/lib/src/version.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
library;
1010

1111
/// The SDK version reported to Sentry.io in the submitted events.
12-
const String sdkVersion = '9.0.0-beta.1';
12+
const String sdkVersion = '9.0.0-RC.2';
1313

1414
String sdkName(bool isWeb) => isWeb ? _browserSdkName : _ioSdkName;
1515

dart/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sentry
2-
version: 9.0.0-beta.1
2+
version: 9.0.0-RC.2
33
description: >
44
A crash reporting library for Dart that sends crash reports to Sentry.io.
55
This library supports Dart VM and Web. For Flutter consider sentry_flutter instead.

dart/test/contexts_test.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ void main() {
4949

5050
final flags = SentryFeatureFlags(
5151
values: [
52-
SentryFeatureFlag(name: 'feature_flag_1', value: true),
53-
SentryFeatureFlag(name: 'feature_flag_2', value: false),
52+
SentryFeatureFlag(flag: 'feature_flag_1', result: true),
53+
SentryFeatureFlag(flag: 'feature_flag_2', result: false),
5454
],
5555
);
5656

@@ -104,8 +104,8 @@ void main() {
104104
'version': {'value': 9},
105105
'flags': {
106106
'values': [
107-
{'name': 'feature_flag_1', 'value': true},
108-
{'name': 'feature_flag_2', 'value': false},
107+
{'flag': 'feature_flag_1', 'result': true},
108+
{'flag': 'feature_flag_2', 'result': false},
109109
]
110110
},
111111
};
@@ -204,8 +204,8 @@ void main() {
204204
final contexts = Contexts();
205205
contexts.flags = SentryFeatureFlags(
206206
values: [
207-
SentryFeatureFlag(name: 'feature_flag_1', value: true),
208-
SentryFeatureFlag(name: 'feature_flag_2', value: false),
207+
SentryFeatureFlag(flag: 'feature_flag_1', result: true),
208+
SentryFeatureFlag(flag: 'feature_flag_2', result: false),
209209
],
210210
);
211211
expect(contexts.flags!.toJson(), flags.toJson());
@@ -323,8 +323,8 @@ const jsonContexts = '''
323323
"gpu": {"name": "Radeon", "version": "1"},
324324
"flags": {
325325
"values": [
326-
{"name": "feature_flag_1", "value": true},
327-
{"name": "feature_flag_2", "value": false}
326+
{"flag": "feature_flag_1", "result": true},
327+
{"flag": "feature_flag_2", "result": false}
328328
]
329329
}
330330
}

dart/test/feature_flags_integration_test.dart

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ void main() {
3232

3333
expect(fixture.hub.scope.contexts[SentryFeatureFlags.type], isNotNull);
3434
expect(
35-
fixture.hub.scope.contexts[SentryFeatureFlags.type]?.values.first.name,
35+
fixture.hub.scope.contexts[SentryFeatureFlags.type]?.values.first.flag,
3636
equals('foo'));
3737
expect(
38-
fixture.hub.scope.contexts[SentryFeatureFlags.type]?.values.first.value,
38+
fixture
39+
.hub.scope.contexts[SentryFeatureFlags.type]?.values.first.result,
3940
equals(true));
4041
});
4142

@@ -49,10 +50,11 @@ void main() {
4950

5051
expect(fixture.hub.scope.contexts[SentryFeatureFlags.type], isNotNull);
5152
expect(
52-
fixture.hub.scope.contexts[SentryFeatureFlags.type]?.values.first.name,
53+
fixture.hub.scope.contexts[SentryFeatureFlags.type]?.values.first.flag,
5354
equals('foo'));
5455
expect(
55-
fixture.hub.scope.contexts[SentryFeatureFlags.type]?.values.first.value,
56+
fixture
57+
.hub.scope.contexts[SentryFeatureFlags.type]?.values.first.result,
5658
equals(false));
5759
});
5860

@@ -69,17 +71,18 @@ void main() {
6971
equals(100));
7072

7173
expect(
72-
fixture.hub.scope.contexts[SentryFeatureFlags.type]?.values.first.name,
74+
fixture.hub.scope.contexts[SentryFeatureFlags.type]?.values.first.flag,
7375
equals('foo_0'));
7476
expect(
75-
fixture.hub.scope.contexts[SentryFeatureFlags.type]?.values.first.value,
77+
fixture
78+
.hub.scope.contexts[SentryFeatureFlags.type]?.values.first.result,
7679
equals(true));
7780

7881
expect(
79-
fixture.hub.scope.contexts[SentryFeatureFlags.type]?.values.last.name,
82+
fixture.hub.scope.contexts[SentryFeatureFlags.type]?.values.last.flag,
8083
equals('foo_99'));
8184
expect(
82-
fixture.hub.scope.contexts[SentryFeatureFlags.type]?.values.last.value,
85+
fixture.hub.scope.contexts[SentryFeatureFlags.type]?.values.last.result,
8386
equals(false));
8487

8588
await sut.addFeatureFlag('foo_100', true);
@@ -88,17 +91,18 @@ void main() {
8891
equals(100));
8992

9093
expect(
91-
fixture.hub.scope.contexts[SentryFeatureFlags.type]?.values.first.name,
94+
fixture.hub.scope.contexts[SentryFeatureFlags.type]?.values.first.flag,
9295
equals('foo_1'));
9396
expect(
94-
fixture.hub.scope.contexts[SentryFeatureFlags.type]?.values.first.value,
97+
fixture
98+
.hub.scope.contexts[SentryFeatureFlags.type]?.values.first.result,
9599
equals(false));
96100

97101
expect(
98-
fixture.hub.scope.contexts[SentryFeatureFlags.type]?.values.last.name,
102+
fixture.hub.scope.contexts[SentryFeatureFlags.type]?.values.last.flag,
99103
equals('foo_100'));
100104
expect(
101-
fixture.hub.scope.contexts[SentryFeatureFlags.type]?.values.last.value,
105+
fixture.hub.scope.contexts[SentryFeatureFlags.type]?.values.last.result,
102106
equals(true));
103107
});
104108
}

dart/test/protocol/contexts_test.dart

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ void main() {
3838
culture: SentryCulture(locale: 'foo-bar'),
3939
trace: _trace,
4040
feedback: _feedback,
41+
flags: SentryFeatureFlags(values: [
42+
SentryFeatureFlag(flag: 'name', result: true),
43+
]),
4144
);
4245

4346
final _contextsJson = <String, dynamic>{
@@ -63,7 +66,12 @@ void main() {
6366
'replay_id': 'fixture-replayId',
6467
'url': 'https://fixture-url.com',
6568
'associated_event_id': '8a32c0f9be1d34a5efb2c4a10d80de9a',
66-
}
69+
},
70+
'flags': {
71+
'values': [
72+
{'flag': 'name', 'result': true}
73+
],
74+
},
6775
};
6876

6977
final _contextsMutlipleRuntimes = Contexts(

dart/test/protocol/sentry_feature_flag_tests.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import '../mocks.dart';
66

77
void main() {
88
final featureFlag = SentryFeatureFlag(
9-
name: 'feature_flag_1',
10-
value: true,
9+
flag: 'feature_flag_1',
10+
result: true,
1111
unknown: testUnknown,
1212
);
1313
final featureFlagJson = <String, dynamic>{
1414
...testUnknown,
15-
'name': 'feature_flag_1',
16-
'value': true,
15+
'flag': 'feature_flag_1',
16+
'result': true,
1717
};
1818

1919
group('json', () {

dart/test/protocol/sentry_feature_flags_tests.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import '../mocks.dart';
77
void main() {
88
final featureFlags = SentryFeatureFlags(
99
values: [
10-
SentryFeatureFlag(name: 'feature_flag_1', value: true),
11-
SentryFeatureFlag(name: 'feature_flag_2', value: false),
10+
SentryFeatureFlag(flag: 'feature_flag_1', result: true),
11+
SentryFeatureFlag(flag: 'feature_flag_2', result: false),
1212
],
1313
unknown: testUnknown,
1414
);

0 commit comments

Comments
 (0)