-
Notifications
You must be signed in to change notification settings - Fork 215
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
Add support for --compiler
flag
#1903
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
natebosch
reviewed
Feb 3, 2023
natebosch
reviewed
Feb 3, 2023
This updates the `--compiler` flag to support a syntax like this `--compiler [<platform-selector>:]<compiler>`. This is quite handy because it allows for instance `-c web:dart2js` or `-c chrome:dart2wasm` etc. It ultimately does not increase the complexity a lot either.
This just fixes the existing tests in preparation for adding new tests.
@natebosch I forgot to send it as a PR, but please take a look at 3748acb which updates the pubspecs and changelogs |
Ok, this PR is ready for a final review now. As discussed offline we decided to leave the wasm support as is for now, given that chrome requires extra special flags to run in that mode, it makes sense to be a separate platform still. |
natebosch
approved these changes
Feb 14, 2023
Co-authored-by: Nate Bosch <nbosch@google.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #1776
Overview
Compiler
class, similar to theRuntime
class, but it doesn't support custom ones (at least for now).package:test_api/backend.dart
defaultCompiler
andsupportedCompilers
fields toRuntime
. This is breaking for custom runtimes.compiler
field toSuitePlatform
. This is how platforms get access to compiler configuration. It means there is no API breaking change for platforms, but they do need to be updated to support the configuration.compiler
parameter is required when creating aSuitePlatform
, although it is nullable, but defaults to the default compiler for the runtime. This is mostly for convenience and up for discussion.source
compiler which is roughly equivalent to--use-data-isolate-strategy
. The--use-data-isolate-strategy
flag is now just an alias for--compiler source
and it it deprecated/hidden.none
but we already haveOS.none
, so it would conflict in boolean selectors.CompilerSelection
class similar toRuntimeSelection
, used bySuiteConfig
to track the selected compiler(s).compilerSelections
field toSuiteConfig
.TestOn
etc.Still to do
Consider merging the wasm support into the regular browser platform. Unclear if we want to do this now or wait. We could do it and then just call the compiler--experimental-dart2wasm
?