Skip to content

Conversation

@jonahwilliams
Copy link
Contributor

@jonahwilliams jonahwilliams commented Sep 6, 2019

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

@fluttergithubbot
Copy link
Contributor

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.

@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label Sep 6, 2019
@jonahwilliams jonahwilliams changed the title add comment explaining skip add comment explaining skip and correct library set Sep 6, 2019
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.
Copy link
Member

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?

Copy link
Contributor Author

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
Copy link

codecov bot commented Sep 6, 2019

Codecov Report

Merging #39983 into master will decrease coverage by 0.26%.
The diff coverage is 0%.

Impacted file tree graph

@@            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
Flag Coverage Δ
#flutter_tool 57.87% <0%> (-0.27%) ⬇️
Impacted Files Coverage Δ
...ges/flutter_tools/lib/src/build_runner/web_fs.dart 21.96% <0%> (-0.26%) ⬇️
...utter_tools/lib/src/build_runner/build_script.dart 0% <0%> (ø) ⬆️
...s/flutter_tools/lib/src/windows/msbuild_utils.dart 0% <0%> (-100%) ⬇️
...s/flutter_tools/lib/src/windows/build_windows.dart 0% <0%> (-85%) ⬇️
.../flutter_tools/lib/src/commands/build_windows.dart 25% <0%> (-60%) ⬇️
packages/flutter_tools/lib/src/base/context.dart 49.12% <0%> (-8.78%) ⬇️
...ages/flutter_tools/lib/src/commands/build_apk.dart 93.61% <0%> (-6.39%) ⬇️
packages/flutter_tools/lib/src/version.dart 90.9% <0%> (-1.92%) ⬇️
packages/flutter_tools/lib/src/project.dart 82.8% <0%> (-0.96%) ⬇️
packages/flutter_tools/lib/src/cache.dart 43.5% <0%> (-0.73%) ⬇️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 296e97f...9d67919. Read the comment docs.

@jonahwilliams jonahwilliams changed the title add comment explaining skip and correct library set Update the supported library set for Flutter for web Sep 10, 2019
import 'dart:io';
import 'dart:typed_data';

import 'package:path/path.dart' as path;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: alphabetize imports

Copy link
Contributor Author

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) {
Copy link
Member

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.

Copy link
Contributor Author

@jonahwilliams jonahwilliams Sep 10, 2019

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.

Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Inconnu08 pushed a commit to Inconnu08/flutter that referenced this pull request Sep 30, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Web] Dartev compile Error http module

5 participants