-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[flutter_svg] wasm compatibility #8014
Merged
auto-submit
merged 14 commits into
flutter:main
from
nank1ro:refactor/wasm-compatibility
Nov 7, 2024
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6c3cc75
refactor/wasm-compatibility
nank1ro 7b397a4
chore/bump versions
nank1ro 6a62471
chore/update changelog message
nank1ro d857895
Merge branch 'main' into refactor/wasm-compatibility
nank1ro 5784d44
refactor/revert changes in vector_graphics
nank1ro 4c522e1
chore: update constraints of dev dependencies
nank1ro 435719f
Merge branch 'main' into refactor/wasm-compatibility
nank1ro d2cfe33
refactor: revert changes in vector graphics compiler
nank1ro 2f2e450
fix: min vector graphics version
nank1ro bcfe1ea
fix compiler min version
nank1ro 3721055
Merge branch 'main' into refactor/wasm-compatibility
nank1ro 6029722
bump version
nank1ro 32fbf69
Merge branch 'main' into refactor/wasm-compatibility
nank1ro 0ca88ce
Update pubspec.yaml
nank1ro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export '_file_io.dart' if (dart.library.html) '_file_none.dart'; | ||
export '_file_io.dart' if (dart.library.js_interop) '_file_none.dart'; | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Sadly, this might still rank this package as NOT wasm-compatible in pub due to issues with configuration specific imports.
Better to do
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.
Other PRs that this one relies on have already landed using this version since #8014 (comment) didn't raise any objection.
Could you elaborate on the issue?
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.
No I can confirm this works because I did it with the fork I published, flutter_svg_plus
You can check the platform support inside the score here https://pub.dev/packages/flutter_svg_plus/score
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.
I have no doubt that it works at runtime. I'm concerned that the wasm classification on
pub.dev
will still be broken without this change.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.
See dart-lang/pana#1324
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.
See https://pub.dev/api/packages/flutter_svg/metrics
Search for package:flutter_svg/src/utilities/file.dart
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.
If you think the score for wasm on pub.dev is wrong, I assure you it is not.
See here https://pub.dev/api/packages/flutter_svg_plus/metrics and here https://pub.dev/api/packages/vector_graphics_compiler/metrics.
The latter is the one which has been already merged using
dart.library.js_interop
as a conditional importThere 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.
I'm confused; I don't see anything in that issue that says that a conditional import based on
js_interop
wouldn't work, and it's currently working in practice. Could you point to a specific discussion/comment that makes you think this won't work in the future?Why are we looking at the published version of
flutter_svg
, which doesn't have the fix in this PR and still usesdart:html
?