Skip to content

Commit aeed961

Browse files
committed
Merge branch 'main' into feat/hive
2 parents 158f93f + 655559e commit aeed961

20 files changed

+387
-459
lines changed

.github/workflows/analyze.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- uses: actions/checkout@v4
3535
- uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d # pin@v1
3636
if: ${{ inputs.sdk == 'dart' }}
37-
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
37+
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 # pin@v2.12.0
3838
if: ${{ inputs.sdk == 'flutter' }}
3939

4040
- run: ${{ inputs.sdk }} pub get

.github/workflows/flutter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
sudo apt install -y network-manager upower
8383
if: matrix.os == 'ubuntu-latest' && matrix.target == 'linux'
8484

85-
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
85+
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 # pin@v2.12.0
8686
with:
8787
channel: ${{ matrix.sdk }}
8888

@@ -201,6 +201,6 @@ jobs:
201201
steps:
202202
- uses: actions/checkout@v4
203203
# To recreate baseline run: detekt -i flutter/android,flutter/example/android -b flutter/config/detekt-bl.xml -cb
204-
- uses: natiginfo/action-detekt-all@e01de6ff0eef7c24131e8a133bf598cfac6ceeab # pin@1.21.0
204+
- uses: natiginfo/action-detekt-all@be3c18799c7c392b2f41a674beed9ced7ae2f21b # pin@1.23.1
205205
with:
206206
args: -i flutter/android,flutter/example/android --baseline flutter/config/detekt-bl.xml --jvm-target 1.8 --build-upon-default-config --all-rules

.github/workflows/flutter_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
distribution: "adopt"
4141
java-version: "11"
4242

43-
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
43+
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 # pin@v2.12.0
4444
with:
4545
channel: ${{ matrix.sdk }}
4646

@@ -122,7 +122,7 @@ jobs:
122122
- name: checkout
123123
uses: actions/checkout@v4
124124

125-
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
125+
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 # pin@v2.12.0
126126
with:
127127
channel: ${{ matrix.sdk }}
128128

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- uses: actions/checkout@v4
3333
- uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d # pin@v1
3434
if: ${{ matrix.package.sdk == 'dart' }}
35-
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
35+
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 # pin@v2.12.0
3636
if: ${{ matrix.package.sdk == 'flutter' }}
3737

3838
- run: ${{ matrix.package.sdk }} pub get

.github/workflows/metrics.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
echo "flutter=$version" >> "$GITHUB_OUTPUT"
5454
5555
- name: Install Flutter v${{ steps.conf.outputs.flutter }}
56-
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
56+
uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 # pin@v2.12.0
5757
with:
5858
flutter-version: ${{ steps.conf.outputs.flutter }}
5959

.github/workflows/min_version_test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
distribution: "adopt"
3333
java-version: "11"
3434

35-
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
35+
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 # pin@v2.12.0
3636
with:
3737
flutter-version: "3.0.0"
3838

@@ -49,7 +49,7 @@ jobs:
4949
steps:
5050
- uses: actions/checkout@v4
5151

52-
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
52+
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 # pin@v2.12.0
5353
with:
5454
flutter-version: "3.0.0"
5555

@@ -66,7 +66,7 @@ jobs:
6666
steps:
6767
- uses: actions/checkout@v4
6868

69-
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
69+
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 # pin@v2.12.0
7070
with:
7171
flutter-version: "3.0.0"
7272

.github/workflows/sqflite.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
sudo apt install -y network-manager upower
7979
if: matrix.os == 'ubuntu-latest' && matrix.target == 'linux'
8080

81-
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
81+
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 # pin@v2.12.0
8282
with:
8383
channel: ${{ matrix.sdk }}
8484

.github/workflows/web-example-ghpages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
steps:
1616
- uses: actions/checkout@v4
17-
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
17+
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 # pin@v2.12.0
1818
- uses: bluefireteam/flutter-gh-pages@57815b17b371455ec1a98f075b71b4c6ba0a938c # pin@v8
1919
with:
2020
workingDir: flutter/example

CHANGELOG.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,25 @@
22

33
## Unreleased
44

5+
### Fixes
6+
7+
- Unsupported types with Expando ([#1690](https://github.com/getsentry/sentry-dart/pull/1690))
8+
59
### Features
610

11+
- StackTraces in `PlatformException.message` will get nicely formatted too when present ([#1716](https://github.com/getsentry/sentry-dart/pull/1716))
712
- Breadcrumbs for database operations ([#1656](https://github.com/getsentry/sentry-dart/pull/1656))
813
- APM for hive ([#1672](https://github.com/getsentry/sentry-dart/pull/1672))
14+
- Add `attachScreenshotOnlyWhenResumed` to options ([#1700](https://github.com/getsentry/sentry-dart/pull/1700))
915

1016
### Dependencies
1117

12-
- Bump Android SDK from v6.32.0 to v6.33.0 ([#1710](https://github.com/getsentry/sentry-dart/pull/1710))
13-
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#6330)
14-
- [diff](https://github.com/getsentry/sentry-java/compare/6.32.0...6.33.0)
18+
- Bump Android SDK from v6.32.0 to v6.33.1 ([#1710](https://github.com/getsentry/sentry-dart/pull/1710), [#1713](https://github.com/getsentry/sentry-dart/pull/1713))
19+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#6331)
20+
- [diff](https://github.com/getsentry/sentry-java/compare/6.32.0...6.33.1)
21+
- Bump Cocoa SDK from v8.14.2 to v8.15.2 ([#1712](https://github.com/getsentry/sentry-dart/pull/1712), [#1714](https://github.com/getsentry/sentry-dart/pull/1714), [#1717](https://github.com/getsentry/sentry-dart/pull/1717))
22+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8152)
23+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.14.2...8.15.2)
1524

1625
## 7.12.0
1726

dart/lib/src/hub.dart

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,8 @@ class _WeakMap {
605605

606606
final SentryOptions _options;
607607

608+
final throwableHandler = UnsupportedThrowablesHandler();
609+
608610
_WeakMap(this._options);
609611

610612
void add(
@@ -615,6 +617,7 @@ class _WeakMap {
615617
if (throwable == null) {
616618
return;
617619
}
620+
throwable = throwableHandler.wrapIfUnsupportedType(throwable);
618621
try {
619622
if (_expando[throwable] == null) {
620623
_expando[throwable] = MapEntry(span, transaction);
@@ -633,6 +636,7 @@ class _WeakMap {
633636
if (throwable == null) {
634637
return null;
635638
}
639+
throwable = throwableHandler.wrapIfUnsupportedType(throwable);
636640
try {
637641
return _expando[throwable] as MapEntry<ISentrySpan, String>?;
638642
} catch (exception, stackTrace) {
@@ -646,3 +650,35 @@ class _WeakMap {
646650
return null;
647651
}
648652
}
653+
654+
/// A handler for unsupported throwables used for Expando<Object>.
655+
@visibleForTesting
656+
class UnsupportedThrowablesHandler {
657+
final _unsupportedTypes = {String, int, double, bool};
658+
final _unsupportedThrowables = <Object>{};
659+
660+
dynamic wrapIfUnsupportedType(dynamic throwable) {
661+
if (_unsupportedTypes.contains(throwable.runtimeType)) {
662+
throwable = _UnsupportedExceptionWrapper(Exception(throwable));
663+
_unsupportedThrowables.add(throwable);
664+
}
665+
return _unsupportedThrowables.lookup(throwable) ?? throwable;
666+
}
667+
}
668+
669+
class _UnsupportedExceptionWrapper {
670+
_UnsupportedExceptionWrapper(this.exception);
671+
672+
final Exception exception;
673+
674+
@override
675+
bool operator ==(Object other) {
676+
if (other is _UnsupportedExceptionWrapper) {
677+
return other.exception.toString() == exception.toString();
678+
}
679+
return false;
680+
}
681+
682+
@override
683+
int get hashCode => exception.toString().hashCode;
684+
}

0 commit comments

Comments
 (0)