Replace a bunch of references to .packages

Most of these arguments are flowing through to a `--packages` argument
which allows passing the `package_config.json` file. In the long term we
should remove the `.packages` file entirely.

TEST=None, the change should have no visible impact.

Change-Id: I60a8b175d5e217a85588bbcb91cc5095514066b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211503
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
This commit is contained in:
Nate Bosch 2021-10-12 20:16:15 +00:00 committed by commit-bot@chromium.org
parent baecc6fccc
commit f9c68a5679
18 changed files with 25 additions and 23 deletions

View file

@ -363,7 +363,7 @@ template("dart_action") {
# The arguments to pass to the Dart script. # The arguments to pass to the Dart script.
# #
# packages (optional): # packages (optional):
# The un-rebased path to the .packages file. # The un-rebased path to the package_config.json file.
# #
# Forwarded to action() with the usual meaning: # Forwarded to action() with the usual meaning:
# depfile # depfile

View file

@ -3,7 +3,7 @@
"":"for details. All rights reserved. Use of this source code is governed by a", "":"for details. All rights reserved. Use of this source code is governed by a",
"":"BSD-style license that can be found in the LICENSE.md file.", "":"BSD-style license that can be found in the LICENSE.md file.",
"packages": "../../.packages", "packages": "../../.dart_tool/package_config.json",
"analyze": { "analyze": {
"options": "analysis_options.yaml", "options": "analysis_options.yaml",

View file

@ -2,7 +2,7 @@
"":"Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file", "":"Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file",
"":"for details. All rights reserved. Use of this source code is governed by a", "":"for details. All rights reserved. Use of this source code is governed by a",
"":"BSD-style license that can be found in the LICENSE.md file.", "":"BSD-style license that can be found in the LICENSE.md file.",
"packages": "../../../../.packages", "packages": "../../../../.dart_tool/package_config.json",
"suites": [ "suites": [
{ {
"name": "sourcemaps_ddk", "name": "sourcemaps_ddk",

View file

@ -2,7 +2,7 @@
"":"Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file", "":"Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file",
"":"for details. All rights reserved. Use of this source code is governed by a", "":"for details. All rights reserved. Use of this source code is governed by a",
"":"BSD-style license that can be found in the LICENSE.md file.", "":"BSD-style license that can be found in the LICENSE.md file.",
"packages": "../../../../../.packages", "packages": "../../../../../.dart_tool/package_config.json",
"suites": [ "suites": [
{ {
"name": "parser", "name": "parser",

View file

@ -2,7 +2,7 @@
"":"Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file", "":"Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file",
"":"for details. All rights reserved. Use of this source code is governed by a", "":"for details. All rights reserved. Use of this source code is governed by a",
"":"BSD-style license that can be found in the LICENSE.md file.", "":"BSD-style license that can be found in the LICENSE.md file.",
"packages": "../../../../../.packages", "packages": "../../../../../.dart_tool/package_config.json",
"suites": [ "suites": [
{ {
"name": "scanner", "name": "scanner",

View file

@ -169,7 +169,8 @@ class LintStep extends Step<LintTestDescription, LintTestDescription, Context> {
description.cache.firstToken = scanner.tokenize(); description.cache.firstToken = scanner.tokenize();
description.cache.lineStarts = scanner.lineStarts; description.cache.lineStarts = scanner.lineStarts;
Uri dotPackages = description.uri.resolve(".packages"); Uri dotPackages =
description.uri.resolve(".dart_tool/package_config.json");
while (true) { while (true) {
if (new File.fromUri(dotPackages).existsSync()) { if (new File.fromUri(dotPackages).existsSync()) {
break; break;
@ -178,7 +179,8 @@ class LintStep extends Step<LintTestDescription, LintTestDescription, Context> {
if (dotPackages.pathSegments.length < Uri.base.pathSegments.length) { if (dotPackages.pathSegments.length < Uri.base.pathSegments.length) {
break; break;
} }
dotPackages = dotPackages.resolve("../.packages"); dotPackages =
dotPackages.resolve("../../.dart_tool/package_config.json");
} }
File dotPackagesFile = new File.fromUri(dotPackages); File dotPackagesFile = new File.fromUri(dotPackages);

View file

@ -2,7 +2,7 @@
"": "Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file", "": "Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file",
"": "for details. All rights reserved. Use of this source code is governed by a", "": "for details. All rights reserved. Use of this source code is governed by a",
"": "BSD-style license that can be found in the LICENSE.md file.", "": "BSD-style license that can be found in the LICENSE.md file.",
"packages": "../../.packages", "packages": "../../.dart_tool/package_config.json",
"suites": [ "suites": [
{ {
"name": "messages", "name": "messages",

View file

@ -3,7 +3,7 @@
"ignored_2":"for details. All rights reserved. Use of this source code is governed by a", "ignored_2":"for details. All rights reserved. Use of this source code is governed by a",
"ignored_3":"BSD-style license that can be found in the LICENSE.md file.", "ignored_3":"BSD-style license that can be found in the LICENSE.md file.",
"packages": "../../.packages", "packages": "../../.dart_tool/package_config.json",
"analyze": { "analyze": {
"options": "analysis_options.yaml", "options": "analysis_options.yaml",
"uris": [ "uris": [

View file

@ -3,7 +3,7 @@
"":"for details. All rights reserved. Use of this source code is governed by a", "":"for details. All rights reserved. Use of this source code is governed by a",
"":"BSD-style license that can be found in the LICENSE.md file.", "":"BSD-style license that can be found in the LICENSE.md file.",
"packages": "../../.packages", "packages": "../../.dart_tool/package_config.json",
"suites": [ "suites": [
{ {

View file

@ -13,7 +13,7 @@ prebuilt_dart2js_action("build_observatory") {
# dart2js produces a .deps file, but it is not in a format that is understood # dart2js produces a .deps file, but it is not in a format that is understood
# by ninja, so we explicitly list all the sources here. # by ninja, so we explicitly list all the sources here.
inputs = [ "../../.packages" ] + observatory_sources inputs = [ "../../.dart_tool/package_config.json" ] + observatory_sources
output = "$target_gen_dir/observatory/web/main.dart.js" output = "$target_gen_dir/observatory/web/main.dart.js"
outputs = [ output ] outputs = [ output ]
@ -24,7 +24,7 @@ prebuilt_dart2js_action("build_observatory") {
args = [ args = [
"-o", "-o",
rebase_path(output), rebase_path(output),
"--packages=" + rebase_path("../../.packages"), "--packages=" + rebase_path("../../.dart_tool/package_config.json"),
"--no-sound-null-safety", "--no-sound-null-safety",
] ]
if (is_debug) { if (is_debug) {

View file

@ -13,7 +13,7 @@ prebuilt_dart2js_action("build_observatory") {
# dart2js produces a .deps file, but it is not in a format that is understood # dart2js produces a .deps file, but it is not in a format that is understood
# by ninja, so we explicitly list all the sources here. # by ninja, so we explicitly list all the sources here.
inputs = [ "../../.packages" ] + observatory_sources inputs = [ "../../.dart_tool/package_config.json" ] + observatory_sources
output = "$target_gen_dir/observatory/web/main.dart.js" output = "$target_gen_dir/observatory/web/main.dart.js"
outputs = [ output ] outputs = [ output ]
@ -24,7 +24,7 @@ prebuilt_dart2js_action("build_observatory") {
args = [ args = [
"-o", "-o",
rebase_path(output), rebase_path(output),
"--packages=" + rebase_path("../../.packages"), "--packages=" + rebase_path("../../.dart_tool/package_config.json"),
] ]
if (is_debug) { if (is_debug) {
args += [ "--enable-asserts" ] args += [ "--enable-asserts" ]

View file

@ -83,7 +83,7 @@ popd # src
mkdir flutter_patched_sdk mkdir flutter_patched_sdk
$checkout/tools/sdks/dart-sdk/bin/dart \ $checkout/tools/sdks/dart-sdk/bin/dart \
--packages=$checkout/.packages \ --packages=$checkout/.dart_tool/package_config.json \
$checkout/pkg/front_end/tool/_fasta/compile_platform.dart \ $checkout/pkg/front_end/tool/_fasta/compile_platform.dart \
dart:core \ dart:core \
-Ddart.vm.product=false \ -Ddart.vm.product=false \
@ -97,7 +97,7 @@ $checkout/tools/sdks/dart-sdk/bin/dart \
vm_outline_strong.dill vm_outline_strong.dill
$checkout/tools/sdks/dart-sdk/bin/dart \ $checkout/tools/sdks/dart-sdk/bin/dart \
--packages=$checkout/.packages \ --packages=$checkout/.dart_tool/package_config.json \
$checkout/pkg/front_end/tool/_fasta/compile_platform.dart \ $checkout/pkg/front_end/tool/_fasta/compile_platform.dart \
--nnbd-agnostic \ --nnbd-agnostic \
--target=flutter \ --target=flutter \

View file

@ -46,7 +46,7 @@ template("compile_platform") {
} }
script = "$_dart_root/pkg/front_end/tool/_fasta/compile_platform.dart" script = "$_dart_root/pkg/front_end/tool/_fasta/compile_platform.dart"
packages = "$_dart_root/.packages" packages = "$_dart_root/.dart_tool/package_config.json"
outputs = invoker.outputs outputs = invoker.outputs

View file

@ -41,7 +41,7 @@ prebuilt_dart_action("dart2js_create_snapshot_entry") {
outputs = [ "$target_gen_dir/dart2js.dart" ] outputs = [ "$target_gen_dir/dart2js.dart" ]
packages = "../../.packages" packages = "../../.dart_tool/package_config.json"
args = [ "--output_dir=$output_dir" ] args = [ "--output_dir=$output_dir" ]
} }
@ -63,7 +63,7 @@ application_snapshot("dart2js") {
vm_args = [] vm_args = []
main_dart = "$target_gen_dir/dart2js.dart" main_dart = "$target_gen_dir/dart2js.dart"
training_args = [ training_args = [
"--packages=" + rebase_path("../../.packages"), "--packages=" + rebase_path("../../.dart_tool/package_config.json"),
"--libraries-spec=" + rebase_path("$sdk_root/lib/libraries.json"), "--libraries-spec=" + rebase_path("$sdk_root/lib/libraries.json"),
# Specifying the platform explicitly elides running the CFE on the sdk # Specifying the platform explicitly elides running the CFE on the sdk

View file

@ -40,7 +40,7 @@ prebuilt_dart_action("generate_summary_strong") {
"../../sdk:write_version_file", "../../sdk:write_version_file",
] ]
script = "../../pkg/analyzer/tool/summary/build_sdk_summaries.dart" script = "../../pkg/analyzer/tool/summary/build_sdk_summaries.dart"
packages = "../../.packages" packages = "../../.dart_tool/package_config.json"
output = "$root_gen_dir/strong.sum" output = "$root_gen_dir/strong.sum"
outputs = [ output ] outputs = [ output ]
vm_args = [ "-Dsdk_hash=$sdk_hash" ] vm_args = [ "-Dsdk_hash=$sdk_hash" ]

View file

@ -59,7 +59,7 @@ template("dart2js_compile") {
script = "../../pkg/compiler/lib/src/dart2js.dart" script = "../../pkg/compiler/lib/src/dart2js.dart"
packages = "../../.packages" packages = "../../.dart_tool/package_config.json"
vm_args = [ "-Dsdk_hash=$sdk_hash" ] vm_args = [ "-Dsdk_hash=$sdk_hash" ]

View file

@ -14,7 +14,7 @@ prebuilt_dart_action("bootstrap_gen_kernel") {
] ]
gen_kernel_script = "$_dart_root/pkg/vm/bin/gen_kernel.dart" gen_kernel_script = "$_dart_root/pkg/vm/bin/gen_kernel.dart"
platform_dill = "$root_out_dir/vm_platform_strong.dill" platform_dill = "$root_out_dir/vm_platform_strong.dill"
dot_packages = rebase_path("$_dart_root/.packages") dot_packages = rebase_path("$_dart_root/.dart_tool/package_config.json")
inputs = [ inputs = [
gen_kernel_script, gen_kernel_script,

View file

@ -101,7 +101,7 @@ template("kernel_service_dill") {
# consuming/producing kernel. # consuming/producing kernel.
"-Dsdk_hash=$sdk_hash", "-Dsdk_hash=$sdk_hash",
"--packages=" + scheme + ":///.packages", "--packages=" + scheme + ":///.dart_tool/package_config.json",
"--platform=" + rebase_path("$root_out_dir/vm_platform_strong.dill"), "--platform=" + rebase_path("$root_out_dir/vm_platform_strong.dill"),
"--filesystem-root=" + rebase_path("../../"), "--filesystem-root=" + rebase_path("../../"),
"--filesystem-scheme=" + scheme, "--filesystem-scheme=" + scheme,