-
Notifications
You must be signed in to change notification settings - Fork 4.1k
feat(*): refactor error handling to preserve stack traces on platform exceptions #8156
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
Conversation
…hub.com/firebaseextended/flutterfire into @rrousselGit/refactor-stream-controller
clearer about the function begin specific to web
function is web specific
a firebase error Increases minimum Dart version to 2.16.0
…hub.com/firebaseextended/flutterfire into @rrousselGit/refactor-error-handling
….com/firebaseextended/flutterfire into @rrousselGit/refactor-error-handling
@rrousselGit Hey Rémi, should min Dart SDK version be moved from 2.12 to 2.16 on pub.dev with this change? Error/throwWithStackTrace.html was added in Dart 2.16 I believe. After updating
Moving back down to 3.1.3 in pubspec.yaml avoided the above:
|
This changes has broken people whose Dart SDK < 2.16 and make people disappointed. |
The pubpsec of the changed package was correctly updated to mention >= 2.16 (see https://pub.dev/packages/firebase_core/versions) It seems like pub isn't picking up transitive dependencies constraints thought We can update all packages to explicitly require 2.16 (even if they weren't directly changed by this PR) if needed. Although it's not going to change the fact that you'd need Dart >= 2.16 |
@rrousselGit Awesome! Thanks Rémi for the update & work on firebase changes / new Error API. Much appreciated. |
@@ -9,7 +9,7 @@ false_secrets: | |||
- example/** | |||
|
|||
environment: | |||
sdk: ">=2.12.0 <3.0.0" | |||
sdk: ">=2.16.0 <3.0.0" |
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.
You change the firebase_core
min sdk to 2.16
with version 1.12.0
. But this version has already been published with min sdk 2.12
on pub.dev. This does not make sense and thus resulted in unexpected compiling errors with dart sdk < 2.16
.
The correct way (in my eyes) is to bump all packages to a higher version and make them dependent on a higher firebase_core
version.
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.
That is to say, there is nothing wrong with pub.dev.
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.
pub should handle transitive dependencies too.
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.
As far as I know, flutter is fetching packages from pub.dev and these packages once released are snapshots (which means they are unmodified). The newly released packages still rely on the old published firebase_core (which require sdk > 2.12) and the packages themselves still require sdk > 2.12, so there no change in sdk requirement but the actual code uses feature provided by sdk 2.16.
In short, you cannot expect a released package to upgrade its min sdk requirement, do you?
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.
Published packages don't have to update their sdk requirement.
It's about pub checking transitive dependencies on installation to verify that they all respect sdk constraints.
Description
Related Issues
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
).This will ensure a smooth and quick review process. Updating the
pubspec.yaml
and changelogs is not required.///
).melos run analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?