-
-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: stacktrace in computed #988
Conversation
❌ Deploy Preview for mobx failed.
|
mobx/test/exceptions_test.dart
Outdated
test('should preserve stacktrace', () async { | ||
final stackTrace = StackTrace.current; | ||
try { | ||
Computed(() => Error.throwWithStackTrace(Exception('test'), stackTrace)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a test with a simple exception instead of using Error.throwWithStackTrace
? Not all code will use this technique. We should see if the stacktrace is picked up automatically from deeper exceptions in code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -91,7 +91,7 @@ class ReactionImpl with DebugCreationStack implements Reaction { | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also need to bump up version and add a changelog for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
66575b6
to
b4c9e9e
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #988 +/- ##
=======================================
Coverage 99.01% 99.01%
=======================================
Files 57 57
Lines 2024 2025 +1
=======================================
+ Hits 2004 2005 +1
Misses 20 20
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
|
fecd79c
to
e431554
Compare
@@ -1,5 +1,5 @@ | |||
name: mobx | |||
version: 2.3.0+1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The set_version command needs to be called from melos to also change the version.dart file for the package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More details in this doc: https://mobx.netlify.app/development/release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatting is in other pr, because there are several files being changed that are not related to current pr
…eserving stacktrace in Computed and Reaction functions
6515e76
to
0d2acde
Compare
when error is thrown in computed stacktrace should not be lost (check tests)
we have to use Error.throwWithStackTrace