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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Unreleased

### Fixes

* Scope.clone incorrectly accesses tags ([#978](https://github.com/getsentry/sentry-dart/pull/978))
* beforeBreadcrumb was not adding the mutated breadcrumb ([#982](https://github.com/getsentry/sentry-dart/pull/982))

### Features

- Bump Cocoa SDK to v7.23.0 ([#968](https://github.com/getsentry/sentry-dart/pull/968))
Expand Down
2 changes: 1 addition & 1 deletion dart/lib/src/scope.dart
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class Scope {
_breadcrumbs.removeFirst();
}

_breadcrumbs.add(breadcrumb);
_breadcrumbs.add(processedBreadcrumb);
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion dart/test/http_client/tracing_client_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class Fixture {
MockClient getClient({int statusCode = 200, String? reason}) {
return MockClient((request) async {
expect(request.url, requestUri);
return Response('', statusCode, reasonPhrase: reason);
return Response('', statusCode, reasonPhrase: reason, request: request);
});
}
}
Expand Down
18 changes: 18 additions & 0 deletions dart/test/scope_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,20 @@ void main() {
expect(sut.breadcrumbs.length, 0);
});

test('Executes and mutates $Breadcrumb', () {
final sut = fixture.getSut(
beforeBreadcrumbCallback: fixture.beforeBreadcrumbMutateCallback,
);

final breadcrumb = Breadcrumb(
message: 'message',
timestamp: DateTime.utc(2019),
);
sut.addBreadcrumb(breadcrumb);

expect(sut.breadcrumbs.first.message, 'new message');
});

test('adds $EventProcessor', () {
final sut = fixture.getSut();

Expand Down Expand Up @@ -642,6 +656,10 @@ class Fixture {
Breadcrumb? beforeBreadcrumbCallback(Breadcrumb? breadcrumb,
{dynamic hint}) =>
null;

Breadcrumb? beforeBreadcrumbMutateCallback(Breadcrumb? breadcrumb,
{dynamic hint}) =>
breadcrumb?.copyWith(message: 'new message');
}

class AddTagsEventProcessor extends EventProcessor {
Expand Down
2 changes: 1 addition & 1 deletion flutter/example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1330;
LastUpgradeCheck = 1300;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Flutter 3.0.5 always changes that, so better to keep this change.

ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1330"
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down