Use `dart pub` instead of `pub` in scripts
Context: The pub top-level command is going away.
https://github.com/dart-lang/sdk/issues/46100
https://dart-review.googlesource.com/c/sdk/+/232131
https://github.com/flutter/engine/pull/31332
Change-Id: Ib8be79bf6450142d250e74971a17ba6ba1a7313a
Bug: https://github.com/flutter/flutter/issues/98060
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/26720
Reviewed-by: Godofredo Contreras <godofredoc@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/28360
Reviewed-by: Casey Hillers <chillers@google.com>
Commit-Queue: Godofredo Contreras <godofredoc@google.com>
Reviewed-by: Kevin Chisholm <kevinjchisholm@google.com>
diff --git a/recipes/devicelab/devicelab_drone.expected/basic.json b/recipes/devicelab/devicelab_drone.expected/basic.json
index 80e8068..7f58482 100644
--- a/recipes/devicelab/devicelab_drone.expected/basic.json
+++ b/recipes/devicelab/devicelab_drone.expected/basic.json
@@ -387,6 +387,7 @@
},
{
"cmd": [
+ "dart",
"pub",
"get"
],
@@ -424,7 +425,7 @@
"hostname": "rdbhost"
}
},
- "name": "pub get"
+ "name": "dart pub get"
},
{
"cmd": [
diff --git a/recipes/devicelab/devicelab_drone.expected/local-engine.json b/recipes/devicelab/devicelab_drone.expected/local-engine.json
index b7cc639..603b95e 100644
--- a/recipes/devicelab/devicelab_drone.expected/local-engine.json
+++ b/recipes/devicelab/devicelab_drone.expected/local-engine.json
@@ -528,6 +528,7 @@
},
{
"cmd": [
+ "dart",
"pub",
"get"
],
@@ -567,7 +568,7 @@
"hostname": "rdbhost"
}
},
- "name": "pub get"
+ "name": "dart pub get"
},
{
"cmd": [
diff --git a/recipes/devicelab/devicelab_drone.expected/no-upload-metrics-linux-staging.json b/recipes/devicelab/devicelab_drone.expected/no-upload-metrics-linux-staging.json
index 37e2d67..f5f945d 100644
--- a/recipes/devicelab/devicelab_drone.expected/no-upload-metrics-linux-staging.json
+++ b/recipes/devicelab/devicelab_drone.expected/no-upload-metrics-linux-staging.json
@@ -387,6 +387,7 @@
},
{
"cmd": [
+ "dart",
"pub",
"get"
],
@@ -424,7 +425,7 @@
"hostname": "rdbhost"
}
},
- "name": "pub get"
+ "name": "dart pub get"
},
{
"cmd": [
diff --git a/recipes/devicelab/devicelab_drone.expected/post-submit.json b/recipes/devicelab/devicelab_drone.expected/post-submit.json
index 8f98cf5..36b171a 100644
--- a/recipes/devicelab/devicelab_drone.expected/post-submit.json
+++ b/recipes/devicelab/devicelab_drone.expected/post-submit.json
@@ -387,6 +387,7 @@
},
{
"cmd": [
+ "dart",
"pub",
"get"
],
@@ -424,7 +425,7 @@
"hostname": "rdbhost"
}
},
- "name": "pub get"
+ "name": "dart pub get"
},
{
"cmd": [
diff --git a/recipes/devicelab/devicelab_drone.expected/upload-metrics-mac.json b/recipes/devicelab/devicelab_drone.expected/upload-metrics-mac.json
index c16adfb..a0d6888 100644
--- a/recipes/devicelab/devicelab_drone.expected/upload-metrics-mac.json
+++ b/recipes/devicelab/devicelab_drone.expected/upload-metrics-mac.json
@@ -449,6 +449,7 @@
},
{
"cmd": [
+ "dart",
"pub",
"get"
],
@@ -486,7 +487,7 @@
"hostname": "rdbhost"
}
},
- "name": "pub get"
+ "name": "dart pub get"
},
{
"cmd": [
diff --git a/recipes/devicelab/devicelab_drone.expected/xcode-chromium-mac.json b/recipes/devicelab/devicelab_drone.expected/xcode-chromium-mac.json
index 19a6e64..95baadd 100644
--- a/recipes/devicelab/devicelab_drone.expected/xcode-chromium-mac.json
+++ b/recipes/devicelab/devicelab_drone.expected/xcode-chromium-mac.json
@@ -449,6 +449,7 @@
},
{
"cmd": [
+ "dart",
"pub",
"get"
],
@@ -486,7 +487,7 @@
"hostname": "rdbhost"
}
},
- "name": "pub get"
+ "name": "dart pub get"
},
{
"cmd": [
diff --git a/recipes/devicelab/devicelab_drone.expected/xcode-devicelab.json b/recipes/devicelab/devicelab_drone.expected/xcode-devicelab.json
index 3ef197f..5b5c4fd 100644
--- a/recipes/devicelab/devicelab_drone.expected/xcode-devicelab.json
+++ b/recipes/devicelab/devicelab_drone.expected/xcode-devicelab.json
@@ -469,6 +469,7 @@
},
{
"cmd": [
+ "dart",
"pub",
"get"
],
@@ -506,7 +507,7 @@
"hostname": "rdbhost"
}
},
- "name": "pub get"
+ "name": "dart pub get"
},
{
"cmd": [
diff --git a/recipes/devicelab/devicelab_drone.py b/recipes/devicelab/devicelab_drone.py
index 2fbd8ea..8bedbaa 100644
--- a/recipes/devicelab/devicelab_drone.py
+++ b/recipes/devicelab/devicelab_drone.py
@@ -95,7 +95,7 @@
max_attempts=3,
timeout=300,
)
- api.step('pub get', ['pub', 'get'], infra_step=True)
+ api.step('dart pub get', ['dart', 'pub', 'get'], infra_step=True)
dep_list = {d['dependency']: d.get('version') for d in deps}
if 'xcode' in dep_list:
api.os_utils.clean_derived_data()
diff --git a/recipes/engine_v2/builder.expected/basic.json b/recipes/engine_v2/builder.expected/basic.json
index fa7be34..04fb7f2 100644
--- a/recipes/engine_v2/builder.expected/basic.json
+++ b/recipes/engine_v2/builder.expected/basic.json
@@ -430,6 +430,7 @@
},
{
"cmd": [
+ "dart",
"pub",
"get"
],
@@ -453,7 +454,7 @@
"[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
]
},
- "name": "pub get"
+ "name": "dart pub get"
},
{
"cmd": [
diff --git a/recipes/engine_v2/builder.expected/basic_custom_vars.json b/recipes/engine_v2/builder.expected/basic_custom_vars.json
index fa7be34..04fb7f2 100644
--- a/recipes/engine_v2/builder.expected/basic_custom_vars.json
+++ b/recipes/engine_v2/builder.expected/basic_custom_vars.json
@@ -430,6 +430,7 @@
},
{
"cmd": [
+ "dart",
"pub",
"get"
],
@@ -453,7 +454,7 @@
"[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
]
},
- "name": "pub get"
+ "name": "dart pub get"
},
{
"cmd": [
diff --git a/recipes/engine_v2/builder.expected/mac.json b/recipes/engine_v2/builder.expected/mac.json
index 0f06293..0ea7eac 100644
--- a/recipes/engine_v2/builder.expected/mac.json
+++ b/recipes/engine_v2/builder.expected/mac.json
@@ -485,6 +485,7 @@
},
{
"cmd": [
+ "dart",
"pub",
"get"
],
@@ -508,7 +509,7 @@
"[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
]
},
- "name": "pub get"
+ "name": "dart pub get"
},
{
"cmd": [
diff --git a/recipes/engine_v2/builder.py b/recipes/engine_v2/builder.py
index 894ab9c..4db36a2 100644
--- a/recipes/engine_v2/builder.py
+++ b/recipes/engine_v2/builder.py
@@ -82,7 +82,7 @@
)
with api.context(env=env, env_prefixes=env_prefixes,
cwd=pub_dir):
- api.step('pub get', ['pub', 'get'])
+ api.step('dart pub get', ['dart', 'pub', 'get'])
for generator_task in generator_tasks:
# Generators must run from inside flutter folder.
cmd = []
diff --git a/recipes/infra/ci_yaml.expected/basic.json b/recipes/infra/ci_yaml.expected/basic.json
index 2dbf2b3..2e717ac 100644
--- a/recipes/infra/ci_yaml.expected/basic.json
+++ b/recipes/infra/ci_yaml.expected/basic.json
@@ -663,6 +663,7 @@
},
{
"cmd": [
+ "dart",
"pub",
"get"
],
@@ -696,7 +697,7 @@
"hostname": "rdbhost"
}
},
- "name": "pub get"
+ "name": "dart pub get"
},
{
"cmd": [
diff --git a/recipes/infra/ci_yaml.expected/presubmit.json b/recipes/infra/ci_yaml.expected/presubmit.json
index 0c1b468..573e78e 100644
--- a/recipes/infra/ci_yaml.expected/presubmit.json
+++ b/recipes/infra/ci_yaml.expected/presubmit.json
@@ -663,6 +663,7 @@
},
{
"cmd": [
+ "dart",
"pub",
"get"
],
@@ -696,7 +697,7 @@
"hostname": "rdbhost"
}
},
- "name": "pub get"
+ "name": "dart pub get"
},
{
"cmd": [
diff --git a/recipes/infra/ci_yaml.expected/release.json b/recipes/infra/ci_yaml.expected/release.json
index c100d59..ee8505f 100644
--- a/recipes/infra/ci_yaml.expected/release.json
+++ b/recipes/infra/ci_yaml.expected/release.json
@@ -663,6 +663,7 @@
},
{
"cmd": [
+ "dart",
"pub",
"get"
],
@@ -696,7 +697,7 @@
"hostname": "rdbhost"
}
},
- "name": "pub get"
+ "name": "dart pub get"
},
{
"cmd": [
diff --git a/recipes/infra/ci_yaml.expected/staging.json b/recipes/infra/ci_yaml.expected/staging.json
index 52980e7..7ab760a 100644
--- a/recipes/infra/ci_yaml.expected/staging.json
+++ b/recipes/infra/ci_yaml.expected/staging.json
@@ -663,6 +663,7 @@
},
{
"cmd": [
+ "dart",
"pub",
"get"
],
@@ -696,7 +697,7 @@
"hostname": "rdbhost"
}
},
- "name": "pub get"
+ "name": "dart pub get"
},
{
"cmd": [
diff --git a/recipes/infra/ci_yaml.py b/recipes/infra/ci_yaml.py
index abb586c..e4336d6 100644
--- a/recipes/infra/ci_yaml.py
+++ b/recipes/infra/ci_yaml.py
@@ -80,7 +80,7 @@
env, env_prefixes = api.repo_util.flutter_environment(flutter_path)
with api.context(env=env, env_prefixes=env_prefixes, cwd=cocoon_path.join('app_dart')):
api.step('flutter doctor', cmd=['flutter', 'doctor'])
- api.step('pub get', cmd=['pub', 'get'])
+ api.step('dart pub get', cmd=['dart', 'pub', 'get'])
generate_jspb_path = cocoon_path.join('app_dart', 'bin', 'generate_jspb.dart')
config_name = '%s_config.json' % repo
if git_branch and not _is_default_branch(git_branch):
diff --git a/recipes/infra/test_ownership.expected/basic.json b/recipes/infra/test_ownership.expected/basic.json
index 27813e6..823e934 100644
--- a/recipes/infra/test_ownership.expected/basic.json
+++ b/recipes/infra/test_ownership.expected/basic.json
@@ -258,6 +258,7 @@
},
{
"cmd": [
+ "dart",
"pub",
"get"
],
@@ -279,7 +280,7 @@
"[START_DIR]/flutter/bin/cache/dart-sdk/bin"
]
},
- "name": "pub get"
+ "name": "dart pub get"
},
{
"cmd": [
diff --git a/recipes/infra/test_ownership.py b/recipes/infra/test_ownership.py
index 04a32b2..fc771a1 100644
--- a/recipes/infra/test_ownership.py
+++ b/recipes/infra/test_ownership.py
@@ -46,7 +46,7 @@
with api.context(env=env, env_prefixes=env_prefixes,
cwd=cocoon_path.join('app_dart')):
api.step('flutter doctor', cmd=['flutter', 'doctor'])
- api.step('pub get', cmd=['pub', 'get'])
+ api.step('dart pub get', cmd=['dart', 'pub', 'get'])
validate_task_owernship_path = cocoon_path.join(
'app_dart', 'bin', 'validate_task_ownership.dart'
)