Drop support for Dart 1 in pub
Closes #33187
Brings in the latest version of pub. There is still an issue with
invaliding old snapshots, but this version works better than the current
synced version.
Change-Id: I5c98b0277ea769baa83c3fee7ebfff2034ba9920
Reviewed-on: https://dart-review.googlesource.com/61983
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a9f2ede..dcfb69f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -44,6 +44,8 @@
#### Pub
+* Pub no longer supports running with `DART_VM_OPTIONS=--no-preview-dart2`.
+
#### Dart2js
* Dart2js now compiles programs by default with Dart 2.0 semantics. Apps are
diff --git a/DEPS b/DEPS
index 8855cf7..635b7e5 100644
--- a/DEPS
+++ b/DEPS
@@ -110,7 +110,7 @@
"ply_rev": "604b32590ffad5cbb82e4afef1d305512d06ae93",
"pool_tag": "1.3.4",
"protobuf_tag": "0.7.1",
- "pub_rev": "c84ffa0265fe746824aa6f382cb6c41abc406d42",
+ "pub_rev": "2258022cb7fd6ec43900d3b88012efb268020019",
"pub_semver_tag": "1.4.1",
"quiver_tag": "0.29.0",
"resource_rev":"af5a5bf65511943398146cf146e466e5f0b95cb9",
diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn
index 1f214f9..226f959 100644
--- a/sdk/BUILD.gn
+++ b/sdk/BUILD.gn
@@ -45,7 +45,6 @@
# ........dartdevc.dart.snapshot
# ........dartdevk.dart.snapshot
# ........kernel_worker.dart.snapshot
-# ........pub1.dart.snapshot
# ........pub.dart.snapshot
#.........resources/
#...........dartdoc/
@@ -131,10 +130,6 @@
"../utils/dartfmt",
],
[
- "pub1",
- "../utils/pub:pub1",
- ],
- [
"pub",
"../utils/pub",
],
@@ -174,10 +169,6 @@
"../utils/bazel:kernel_worker",
],
[
- "pub1",
- "../utils/pub:pub1",
- ],
- [
"pub",
"../utils/pub",
],
diff --git a/sdk/bin/pub_sdk b/sdk/bin/pub_sdk
index db6d553..4d29878 100755
--- a/sdk/bin/pub_sdk
+++ b/sdk/bin/pub_sdk
@@ -42,8 +42,8 @@
# Run the pub snapshot.
DART="$BIN_DIR/dart"
if array_contains "--no-preview-dart-2" "${VM_OPTIONS[@]}"; then
- SNAPSHOT="$BIN_DIR/snapshots/pub1.dart.snapshot"
- exec "$DART" "${VM_OPTIONS[@]}" "$SNAPSHOT" "$@"
+ echo "Pub no longer supports Dart 1"
+ exit -1
else
SNAPSHOT="$BIN_DIR/snapshots/pub.dart.snapshot"
exec "$DART" "${VM_OPTIONS[@]}" "$SNAPSHOT" "$@"
diff --git a/sdk/bin/pub_sdk.bat b/sdk/bin/pub_sdk.bat
index 86697aa..bde0e4a 100644
--- a/sdk/bin/pub_sdk.bat
+++ b/sdk/bin/pub_sdk.bat
@@ -29,7 +29,7 @@
)
if defined USING_DART_1 (
- "%BIN_DIR%\dart" %VM_OPTIONS% "%BIN_DIR%\snapshots\pub1.dart.snapshot" %*
+ echo "Pub no longer supports Dart 1"
) else (
"%BIN_DIR%\dart" %VM_OPTIONS% "%BIN_DIR%\snapshots\pub.dart.snapshot" %*
)
diff --git a/utils/pub/BUILD.gn b/utils/pub/BUILD.gn
index 6d75f38..a87616b 100644
--- a/utils/pub/BUILD.gn
+++ b/utils/pub/BUILD.gn
@@ -4,11 +4,6 @@
import("../application_snapshot.gni")
-application_snapshot("pub1") {
- main_dart = "../../third_party/pkg/pub/bin/pub.dart"
- training_args = [ "--help" ]
-}
-
application_snapshot("pub") {
dart_version = 2
main_dart = "../../third_party/pkg/pub/bin/pub.dart"