-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Update the supported library set for Flutter for web #39983
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
Update the supported library set for Flutter for web #39983
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. While there are exceptions to this rule, if this patch modifies code it is probably not an exception. Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
| const String kProfileFlag = 'profile'; | ||
|
|
||
| // A minimum set of libraries to skip checks for to keep the examples compiling | ||
| // until we make a decision on whether to support dart:io on the web. |
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.
Is there a github issue for the dart:io decision?
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.
Updated with the issue tracking the primary API decision for Platform
Codecov Report
@@ Coverage Diff @@
## master #39983 +/- ##
==========================================
- Coverage 58.13% 57.87% -0.27%
==========================================
Files 194 194
Lines 18730 18733 +3
==========================================
- Hits 10888 10841 -47
- Misses 7842 7892 +50
Continue to review full report at Codecov.
|
| import 'dart:io'; | ||
| import 'dart:typed_data'; | ||
|
|
||
| import 'package:path/path.dart' as path; |
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.
nit: alphabetize imports
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
|
|
||
| /// Returns a [ComparisonResult] to describe the pixel differential of the | ||
| /// [test] and [master] image bytes provided. | ||
| ComparisonResult compareLists(List<int> test, List<int> master) { |
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 haven't worked out all the details, but I suspect that with sufficient cleverness the analyzer and/or kernel compiler can be made to check that two different libraries implement the same signature by reducing it to the problem of checking that a class correctly implements an interface and then injecting the class into the right place, like we do in the tool. In a world where we want to do something like that, top-levels and statics would get in the way a bit.
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've implemented this check manually in the engine repo by walking both libraries and comparing types, its not great.
Currently we are running tests in both environments so we can catch type errors in CI.
Longer term I would like to not use config specific imports at all, but that is somewhat gated on what is decided on the SDK structure for flutter for web.
Piinks
left a comment
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.
LGTM!
Description
We're skipping build script checks for these libraries temporarily until we make a decision on dart:io support on the web. Reland of rolled back PR due to missing video_player.
EDIT:
In turns out I needed to land the refactor of goldens to not rely on platform specific code too ...
Includes some fixes from #38773
Fixes #34858