Skip to content

Commit 89c47ee

Browse files
committed
Merge branch 'main' into feat/app-context-screen
2 parents 445babb + 2211a40 commit 89c47ee

27 files changed

+4891
-65
lines changed

.github/workflows/diagrams.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: diagrams
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
diagrams:
7+
runs-on: ubuntu-latest
8+
name: "Create class diagrams of all packages"
9+
steps:
10+
- uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d # pin@v1
11+
with:
12+
sdk: stable
13+
14+
- uses: actions/checkout@v3
15+
16+
- name: dependencies
17+
run: |
18+
dart pub global activate lakos
19+
sudo apt update
20+
sudo apt install graphviz
21+
22+
- name: dart
23+
working-directory: ./dart
24+
run: lakos . -i "{test/**,example/**,example_web/**}" | dot -Tsvg -o class-diagram.svg
25+
26+
- name: flutter
27+
working-directory: ./flutter
28+
run: lakos . -i "{test/**,example/**}" | dot -Tsvg -o class-diagram.svg
29+
30+
- name: dio
31+
working-directory: ./dio
32+
run: lakos . -i "{test/**,example/**}" | dot -Tsvg -o class-diagram.svg
33+
34+
- name: file
35+
working-directory: ./file
36+
run: lakos . -i "{test/**,example/**}" | dot -Tsvg -o class-diagram.svg
37+
38+
- name: sqflite
39+
working-directory: ./sqflite
40+
run: lakos . -i "{test/**,example/**}" | dot -Tsvg -o class-diagram.svg
41+
42+
- name: logging
43+
working-directory: ./logging
44+
run: lakos . -i "{test/**,example/**}" | dot -Tsvg -o class-diagram.svg
45+
46+
# Source: https://stackoverflow.com/a/58035262
47+
- name: Extract branch name
48+
shell: bash
49+
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
50+
id: extract_branch
51+
52+
# actions/checkout fetches only a single commit in a detached HEAD state. Therefore
53+
# we need to pass the current branch, otherwise we can't commit the changes.
54+
# GITHUB_HEAD_REF is the name of the head branch. GitHub Actions only sets this for PRs.
55+
- name: Commit & push
56+
run: ./scripts/commit-code.sh ${{ steps.extract_branch.outputs.branch }} "Update class diagrams"

.github/workflows/format-and-fix.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ jobs:
5151
# we need to pass the current branch, otherwise we can't commit the changes.
5252
# GITHUB_HEAD_REF is the name of the head branch. GitHub Actions only sets this for PRs.
5353
- name: Commit & push
54-
run: ./scripts/commit-formatted-code.sh ${{ steps.extract_branch.outputs.branch }}
54+
run: ./scripts/commit-code.sh ${{ steps.extract_branch.outputs.branch }} "Format & fix code"

CHANGELOG.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@
1010
### Dependencies
1111

1212
- Enable compatibility with uuid v4 ([#1647](https://github.com/getsentry/sentry-dart/pull/1647))
13-
- Bump Cocoa SDK from v8.11.0 to v8.12.0 ([#1650](https://github.com/getsentry/sentry-dart/pull/1650))
14-
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8120)
15-
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.11.0...8.12.0)
13+
- Bump Cocoa SDK from v8.11.0 to v8.13.0 ([#1650](https://github.com/getsentry/sentry-dart/pull/1650), [#1655](https://github.com/getsentry/sentry-dart/pull/1655))
14+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8130)
15+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.11.0...8.13.0)
16+
- Bump Android SDK from v6.29.0 to v6.30.0 ([#1660](https://github.com/getsentry/sentry-dart/pull/1660))
17+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#6300)
18+
- [diff](https://github.com/getsentry/sentry-java/compare/6.29.0...6.30.0)
1619

1720
## 7.10.1
1821

dart/class-diagram.svg

+3,364
Loading

dart/lib/src/hub.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ class Hub {
277277
exception: exception,
278278
stackTrace: stackTrace,
279279
);
280-
if (_options.devMode) {
280+
if (_options.automatedTestMode) {
281281
rethrow;
282282
}
283283
}
@@ -377,7 +377,7 @@ class Hub {
377377
SentryLevel.error,
378378
"Error in the 'configureScope' callback, error: $err",
379379
);
380-
if (_options.devMode) {
380+
if (_options.automatedTestMode) {
381381
rethrow;
382382
}
383383
}

dart/lib/src/scope.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ class Scope {
178178
exception: exception,
179179
stackTrace: stackTrace,
180180
);
181-
if (_options.devMode) {
181+
if (_options.automatedTestMode) {
182182
rethrow;
183183
}
184184
}
@@ -345,7 +345,7 @@ class Scope {
345345
exception: exception,
346346
stackTrace: stackTrace,
347347
);
348-
if (_options.devMode) {
348+
if (_options.automatedTestMode) {
349349
rethrow;
350350
}
351351
}

dart/lib/src/sentry.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class Sentry {
5858
exception: exception,
5959
stackTrace: stackTrace,
6060
);
61-
if (sentryOptions.devMode) {
61+
if (sentryOptions.automatedTestMode) {
6262
rethrow;
6363
}
6464
}

dart/lib/src/sentry_client.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ class SentryClient {
401401
exception: exception,
402402
stackTrace: stackTrace,
403403
);
404-
if (_options.devMode) {
404+
if (_options.automatedTestMode) {
405405
rethrow;
406406
}
407407
}
@@ -438,7 +438,7 @@ class SentryClient {
438438
exception: exception,
439439
stackTrace: stackTrace,
440440
);
441-
if (_options.devMode) {
441+
if (_options.automatedTestMode) {
442442
rethrow;
443443
}
444444
}

dart/lib/src/sentry_options.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -353,10 +353,10 @@ class SentryOptions {
353353
/// are set.
354354
bool? enableTracing;
355355

356-
/// Changed SDK behaviour when set to true:
356+
/// Only for internal use. Changed SDK behaviour when set to true:
357357
/// - Rethrow exceptions that occur in user provided closures
358358
@internal
359-
bool devMode = false;
359+
bool automatedTestMode = false;
360360

361361
SentryOptions({this.dsn, PlatformChecker? checker}) {
362362
if (checker != null) {

dart/lib/src/sentry_traces_sampler.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class SentryTracesSampler {
4040
exception: exception,
4141
stackTrace: stackTrace,
4242
);
43-
if (_options.devMode) {
43+
if (_options.automatedTestMode) {
4444
rethrow;
4545
}
4646
}

dart/test/environment_test.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void main() {
2323
release: 'release-9.8.7',
2424
dist: 'bar',
2525
);
26-
options.devMode = true;
26+
options.automatedTestMode = true;
2727

2828
await Sentry.init(
2929
(options) => options,
@@ -44,7 +44,7 @@ void main() {
4444
release: 'release-9.8.7',
4545
dist: 'bar',
4646
);
47-
options.devMode = true;
47+
options.automatedTestMode = true;
4848

4949
await Sentry.init(
5050
(options) => options,

dart/test/event_processor/deduplication_event_processor_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void main() {
7777

7878
final transport = MockTransport();
7979

80-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
80+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
8181
await Sentry.init(
8282
(options) {
8383
options.dsn = fakeDsn;

dart/test/event_processor/enricher/io_enricher_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ void main() {
159159
});
160160

161161
test('$IoEnricherEventProcessor gets added on init', () async {
162-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
162+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
163163
late SentryOptions configuredOptions;
164164
await Sentry.init(
165165
(options) {

dart/test/initialization_test.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ void main() {
1414
});
1515

1616
test('async re-initilization', () async {
17-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
17+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
1818
await Sentry.init(
1919
(options) {
2020
options.dsn = fakeDsn;
@@ -35,7 +35,7 @@ void main() {
3535
// This is the failure from
3636
// https://github.com/getsentry/sentry-dart/issues/508
3737
test('re-initilization', () async {
38-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
38+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
3939
await Sentry.init(
4040
(options) {
4141
options.dsn = fakeDsn;

dart/test/sentry_test.dart

+20-20
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ void main() {
1818
var anException = Exception();
1919

2020
setUp(() async {
21-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
21+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
2222
await Sentry.init(
2323
options: options,
2424
(options) => {
@@ -137,7 +137,7 @@ void main() {
137137
});
138138

139139
test('null DSN', () async {
140-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
140+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
141141
expect(
142142
() async => await Sentry.init(
143143
options: options,
@@ -150,7 +150,7 @@ void main() {
150150

151151
test('appRunner should be optional', () async {
152152
expect(Sentry.isEnabled, false);
153-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
153+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
154154
await Sentry.init(
155155
options: options,
156156
(options) => options.dsn = fakeDsn,
@@ -159,7 +159,7 @@ void main() {
159159
});
160160

161161
test('empty DSN', () async {
162-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
162+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
163163
await Sentry.init(
164164
options: options,
165165
(options) => options.dsn = '',
@@ -170,7 +170,7 @@ void main() {
170170
test('empty DSN disables the SDK but runs the integrations', () async {
171171
final integration = MockIntegration();
172172

173-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
173+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
174174
await Sentry.init(
175175
options: options,
176176
(options) {
@@ -183,7 +183,7 @@ void main() {
183183
});
184184

185185
test('close disables the SDK', () async {
186-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
186+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
187187
await Sentry.init(
188188
options: options,
189189
(options) => options.dsn = fakeDsn,
@@ -207,7 +207,7 @@ void main() {
207207
test('should install integrations', () async {
208208
final integration = MockIntegration();
209209

210-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
210+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
211211
await Sentry.init(
212212
options: options,
213213
(options) {
@@ -221,7 +221,7 @@ void main() {
221221

222222
test('should add default integrations', () async {
223223
late SentryOptions optionsReference;
224-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
224+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
225225
await Sentry.init(
226226
options: options,
227227
(options) {
@@ -245,7 +245,7 @@ void main() {
245245
}, onPlatform: {'browser': Skip()});
246246

247247
test('should add only web compatible default integrations', () async {
248-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
248+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
249249
await Sentry.init(
250250
options: options,
251251
(options) {
@@ -261,7 +261,7 @@ void main() {
261261
test('should close integrations', () async {
262262
final integration = MockIntegration();
263263

264-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
264+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
265265
await Sentry.init(
266266
options: options,
267267
(options) {
@@ -277,7 +277,7 @@ void main() {
277277
});
278278

279279
test('$DeduplicationEventProcessor is added on init', () async {
280-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
280+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
281281
await Sentry.init(
282282
options: options,
283283
(options) {
@@ -294,7 +294,7 @@ void main() {
294294
final completer = Completer();
295295
var completed = false;
296296

297-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
297+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
298298
final init = Sentry.init(
299299
options: options,
300300
(options) {
@@ -321,7 +321,7 @@ void main() {
321321
final completer = Completer();
322322
var completed = false;
323323

324-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
324+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
325325
final init = Sentry.init(
326326
options: options,
327327
(options) {
@@ -345,11 +345,11 @@ void main() {
345345

346346
test('options.environment debug', () async {
347347
final sentryOptions = SentryOptions(dsn: fakeDsn)
348-
..devMode = true
348+
..automatedTestMode = true
349349
..platformChecker = FakePlatformChecker.debugMode();
350350

351351
final options = SentryOptions();
352-
options.devMode = true;
352+
options.automatedTestMode = true;
353353
await Sentry.init(
354354
(options) {
355355
options.dsn = fakeDsn;
@@ -363,7 +363,7 @@ void main() {
363363
test('options.environment profile', () async {
364364
final sentryOptions =
365365
SentryOptions(dsn: fakeDsn, checker: FakePlatformChecker.profileMode())
366-
..devMode = true;
366+
..automatedTestMode = true;
367367

368368
await Sentry.init(
369369
(options) {
@@ -378,7 +378,7 @@ void main() {
378378
test('options.environment production (defaultEnvironment)', () async {
379379
final sentryOptions =
380380
SentryOptions(dsn: fakeDsn, checker: FakePlatformChecker.releaseMode())
381-
..devMode = true;
381+
..automatedTestMode = true;
382382
await Sentry.init(
383383
(options) {
384384
options.dsn = fakeDsn;
@@ -392,7 +392,7 @@ void main() {
392392
test('options.logger is set by setting the debug flag', () async {
393393
final sentryOptions =
394394
SentryOptions(dsn: fakeDsn, checker: FakePlatformChecker.debugMode())
395-
..devMode = true;
395+
..automatedTestMode = true;
396396

397397
await Sentry.init(
398398
(options) {
@@ -417,7 +417,7 @@ void main() {
417417

418418
test('throw is handled and logged', () async {
419419
final sentryOptions = SentryOptions(dsn: fakeDsn)
420-
..devMode = false
420+
..automatedTestMode = false
421421
..debug = true
422422
..logger = fixture.mockLogger;
423423

@@ -439,7 +439,7 @@ void main() {
439439

440440
test('throw is handled and logged', () async {
441441
final sentryOptions = SentryOptions(dsn: fakeDsn)
442-
..devMode = false
442+
..automatedTestMode = false
443443
..debug = true
444444
..logger = fixture.mockLogger;
445445

0 commit comments

Comments
 (0)