Flip dartfmt to run in Dart 2 mode.

Change-Id: I245dce2510ccf99cd443b4d27828790dabe54e8a
Reviewed-on: https://dart-review.googlesource.com/56283
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
This commit is contained in:
Bob Nystrom 2018-05-23 20:45:03 +00:00 committed by commit-bot@chromium.org
parent ade600c4b3
commit 7c59fe6332
5 changed files with 8 additions and 5 deletions

View file

@ -28,4 +28,4 @@ DART_ROOT="$(cd "${SDK_DIR}/.." ; pwd -P)"
DARTFMT="$DART_ROOT/third_party/pkg_tested/dart_style/bin/format.dart"
exec "$DART" "--packages=$DART_ROOT/.packages" "$DARTFMT" "$@"
exec "$DART" "--preview-dart-2" "--packages=$DART_ROOT/.packages" "$DARTFMT" "$@"

View file

@ -27,7 +27,7 @@ if %DART_ROOT:~-1%==\ set DART_ROOT=%DART_ROOT:~0,-1%
set DARTFMT=%DART_ROOT%\third_party\pkg_tested\dart_style\bin\format.dart
"%DART%" "--packages=%DART_ROOT%\.packages" "%DARTFMT%" %*
"%DART%" "--preview-dart-2" "--packages=%DART_ROOT%\.packages" "%DARTFMT%" %*
endlocal

View file

@ -26,4 +26,4 @@ SNAPSHOT="$BIN_DIR/snapshots/dartfmt.dart.snapshot"
# We are running the snapshot in the built SDK.
DART="$BIN_DIR/dart"
exec "$DART" "$SNAPSHOT" "$@"
exec "$DART" "--preview-dart-2" "$SNAPSHOT" "$@"

View file

@ -14,7 +14,7 @@ for %%i in ("%RETURNED_BIN_DIR%") do set BIN_DIR=%%~fi
set DART=%BIN_DIR%\dart
set SNAPSHOT=%BIN_DIR%\snapshots\dartfmt.dart.snapshot
"%DART%" "%SNAPSHOT%" %*
"%DART%" "--preview-dart-2" "%SNAPSHOT%" %*
endlocal

View file

@ -5,6 +5,9 @@
import("../application_snapshot.gni")
application_snapshot("dartfmt") {
dart_version = 2
main_dart = "../../third_party/pkg_tested/dart_style/bin/format.dart"
training_args = [ "--help" ]
# Train it on formatting its own source.
training_args = [ "../../third_party/pkg_tested/dart_style" ]
}