ffc36db613
where --enable experiment is accepted Adds --enable-experiment support for: - dart compile aot-snapshot - dart compile jit-snapshot - dart compile js - dart compile exe - dart compile kernel Also changes --enable-experiment from a top level CLI flag to a per-command flag. --enable-experiment flags will now only be interpreted by the VM if: 1) They are provided before a CLI command (e.g., dart --enable-experiment=non-nullable analyze) or 2) They are provided with an explicit or implicit run command (e.g., dart --enable-experiment=non-nullable foo.dart or dart --enable-experiment=non-nullable run foo.dart or dart run --enable-experiment=non-nullable foo.dart) This should make it more generally clear where --enable-experiment is accepted and what subcommands can accept the flag. Prior to this change, providing --enable-experiment anywhere, even for commands without experiment support, would not raise an error. Fixes https://github.com/dart-lang/sdk/issues/43623 Change-Id: I5ec48b2dd2bb6db5526185dae2edbca95ef24d9f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169902 Commit-Queue: Ben Konyi <bkonyi@google.com> Reviewed-by: Sigurd Meldgaard <sigurdm@google.com> Reviewed-by: Jonas Jensen <jonasfj@google.com>
Dart CLI tooling
A command-line utility for Dart development.
Usage: dart [<vm-flags>] <command|dart-file> [<arguments>]
Global options:
-h, --help Print this usage information.
-v, --verbose Show additional command output.
--version Print the Dart SDK version.
--enable-analytics Enable anonymous analytics.
--disable-analytics Disable anonymous analytics.
Available commands:
analyze Analyze the project's Dart code.
compile Compile Dart to various formats.
create Create a new project.
format Idiomatically format Dart source code.
pub Work with packages.
run Run a Dart program.
test Run tests in this package.
Run "dart help <command>" for more information about a command.
See https://dart.dev/tools/dart-tool for detailed documentation.
Contributing
If you'd like to contribute to the Dart CLI tool, please start by reading the contribution guidelines for the Dart project. Then familiarize yourself with the [design principles][design] that guide this tool's UX.
Features and bugs
Please file feature requests and bugs in the Dart SDK [issue tracker][tracker]
with label area-dart-cli.
[design] https://github.com/dart-lang/sdk/blob/master/pkg/dartdev/doc/design.md [tracker]: https://github.com/dart-lang/sdk/labels/area-dart-cli