| commit | 29268c6c1db41e9959f0e37030b627daec8f9d5e | [log] [tgz] |
|---|---|---|
| author | David Morgan <davidmorgan@google.com> | Mon Dec 04 09:24:32 2023 +0000 |
| committer | Commit Queue <dart-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Dec 04 09:24:32 2023 +0000 |
| tree | 13f895d35d0d75c4d048b5815870e28dc2b3a808 | |
| parent | 38e5af5e7d9c21455715d7192217743548c63a00 [diff] |
[dart2js] Remove trailing whitespace and newline from error message.
Before:
```
dart compile js --wrong-flag
Compile Dart to JavaScript.
Usage: dart compile js [arguments] <dart entry point>
-h, --help Print this usage information.
-h -v Show detailed information about all options.
-o, --output Write the output to <file name>.
-O<0,1,2,3,4> Set the compiler optimization level (defaults to -O1).
-O0 No optimizations (only meant for debugging the compiler).
-O1 Default (includes whole program analyses and inlining).
-O2 Safe production-oriented optimizations (like minification).
-O3 Potentially unsafe optimizations (see -h -v for details).
-O4 More agressive unsafe optimizations (see -h -v for details).
<-- TWO SPACES HERE and a newline
Error: Unknown option '--wrong-flag'.
```
After this change:
```
dart compile js --wrong-flag
Compile Dart to JavaScript.
Usage: dart compile js [arguments] <dart entry point>
-h, --help Print this usage information.
-h -v Show detailed information about all options.
-o, --output Write the output to <file name>.
-O<0,1,2,3,4> Set the compiler optimization level (defaults to -O1).
-O0 No optimizations (only meant for debugging the compiler).
-O1 Default (includes whole program analyses and inlining).
-O2 Safe production-oriented optimizations (like minification).
-O3 Potentially unsafe optimizations (see -h -v for details).
-O4 More agressive unsafe optimizations (see -h -v for details).
Error: Unknown option '--wrong-flag'.
```
R=sra@google.com
Change-Id: Ie0541d830b53e3e81b4b02a20988cbd41db64325
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/339300
Auto-Submit: Morgan :) <davidmorgan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
Dart is:
Optimized for UI: Develop with a programming language specialized around the needs of user interface creation.
Productive: Make changes iteratively: use hot reload to see the result instantly in your running app.
Fast on all platforms: Compile to ARM & x64 machine code for mobile, desktop, and backend. Or compile to JavaScript for the web.
Dart's flexible compiler technology lets you run Dart code in different ways, depending on your target platform and goals:
Dart Native: For programs targeting devices (mobile, desktop, server, and more), Dart Native includes both a Dart VM with JIT (just-in-time) compilation and an AOT (ahead-of-time) compiler for producing machine code.
Dart Web: For programs targeting the web, Dart Web includes both a development time compiler (dartdevc) and a production time compiler (dart2js).
Dart is free and open source.
See LICENSE and PATENT_GRANT.
Visit dart.dev to learn more about the language, tools, and to find codelabs.
Browse pub.dev for more packages and libraries contributed by the community and the Dart team.
Our API reference documentation is published at api.dart.dev, based on the stable release. (We also publish docs from our beta and dev channels, as well as from the primary development branch).
If you want to build Dart yourself, here is a guide to getting the source, preparing your machine to build the SDK, and building.
There are more documents on our wiki.
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.