Compile client code with dart2wasm #6953
Merged
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.
This configures
build_web_compilersto use ddc on dev builds (dash_site serve) while compiling with bothdart2jsanddart2wasmon release modes (dash_site build, or the added--releaseflag toserveto experiment with this more easily).Using jaspr CLI options to switch to dart2wasm would only compile sources with
dart2wasm, this uses both compilers and a feature detection snippet emitted bydart2wasmto determine which variant is used. That seems to be in spirit of #6854.To stop jaspr from overriding options passed to
build_web_compilers, one needs to use the--no-managed-build-optionsflag. A downside is that thePRODUCTIONdefine set on release modes would not be forwarded to client code any longer. The constant is only used in therobots.txtgenerator so this should be fine, forwarding this to client code would require more changes tojaspr_cli.Closes #6854.