Update the supported library set for Flutter for web#39983
Update the supported library set for Flutter for web#39983jonahwilliams merged 11 commits intoflutter:masterfrom
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.
Is there a github issue for the dart:io decision?
There was a problem hiding this comment.
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; |
|
|
||
| /// 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.
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.
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.
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