-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Codegen an entrypoint for flutter web applications #33956
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
Codegen an entrypoint for flutter web applications #33956
Conversation
| @@ -1,16 +0,0 @@ | |||
| // Copyright 2019 The Chromium Authors. All rights reserved. | |||
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.
This is no longer needed, hurrah
yjbanov
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 if LGT @hterkelsen
| bool matches = false; | ||
| for (String target in targets) { | ||
| if (buildStep.inputId.path.contains(target)) { | ||
| if (buildStep.inputId.path.contains(fs.path.setExtension(target, '_web_entrypoint.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.
Would this not result in blah._web_entrypoint.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.
Surprisingly not
| ); | ||
| return result.status == core.BuildStatus.success; | ||
| } on core.BuildConfigChangedException { | ||
| projectDirectory |
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.
Ideally you wouldn't delete the entire .dart_tool dir - pub also uses it to cache local dependency snapshots for binaries.
You could delete .dart_tool/build but that would also bash over any other builds.
We do have the functionality to do a more fine grained cleanup, that only deletes the actual known outputs as well, see here https://github.com/dart-lang/build/blob/master/build_runner/lib/src/entrypoint/clean.dart#L41.
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.
Awesome,I tried to adapt that code to this in a way that makes sense
packages/flutter_tools/lib/src/build_runner/web_compilation_delegate.dart
Outdated
Show resolved
Hide resolved
* master: (25 commits) Increase daemon protocol version for getSupportedPlatforms (flutter#33980) skip web test on crazy import (flutter#34017) Compatibility pass on flutter/foundation tests for JavaScript compilation. (1) (flutter#33349) 0602dbb Roll src/third_party/dart 9dcb026b26..6e0d978505 (72 commits) (flutter#34027) Add chrome stable to dockerfile and web shard (flutter#33787) Codegen an entrypoint for flutter web applications (flutter#33956) Revert "Reland "Text inline widgets, TextSpan rework" (flutter#33946)" (flutter#34002) Revert "Re-add deprecated method for plugin migration compatibility. (flutter#34006)" (flutter#34022) Remove print (flutter#34004) Manual roll the engine to land the timing API (flutter#33989) Make plugins Swift-first on macOS (flutter#33997) Re-add deprecated method for plugin migration compatibility. (flutter#34006) make sure version check includes hotfixes (flutter#33459) Respond to AndroidView focus events. (flutter#33901) Add 'doctor' support for Windows (flutter#33872) Add use_frameworks to macOS Podfile template (flutter#33987) [Material] Create a themable Range Slider (continuous and discrete) (flutter#31681) Updating names to correct versioning convention (flutter#33865) Whitelist adb.exe heap corruption exit code. (flutter#33951) [flutter_tool] Fix 'q' for Fuchsia profile/debug mode (flutter#33846) ...
Description
Generate an entrypoint that is flutter web specific. This avoids needing to reference the "webonly" members for now. ~~ Still need to wire up dart2js with something similar.~~ Done
cc @hterkelsen, I imagine you would use this for plugins too