Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8d46b7c

Browse files
lrhnCommit Queue
authored and
Commit Queue
committed
Remove references to .packages from build scripts.
It's just names and comments, they already used `package_config.json` as the package configuration. Change-Id: Icd421ed99079fa9058426e1536565658938252ac Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414100 Commit-Queue: Lasse Nielsen <lrn@google.com> Reviewed-by: Brian Quinlan <bquinlan@google.com>
1 parent f409226 commit 8d46b7c

File tree

5 files changed

+23
-22
lines changed

5 files changed

+23
-22
lines changed

‎build/dart/dart_action.gni‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ template("_prebuilt_tool_action") {
179179
# The arguments to pass to the Dart script.
180180
#
181181
# packages (optional):
182-
# The un-rebased path to the .packages file.
182+
# The un-rebased path to the package_config.json file.
183183
#
184184
# Forwarded to action() with the usual meaning:
185185
# depfile
@@ -218,7 +218,7 @@ template("prebuilt_dart_action") {
218218
# The arguments to pass to the Dart script.
219219
#
220220
# packages (optional):
221-
# The un-rebased path to the .packages file.
221+
# The un-rebased path to the package_config.json file.
222222
#
223223
# Forwarded to action() with the usual meaning:
224224
# depfile
@@ -292,7 +292,7 @@ template("_built_tool_action") {
292292
# The arguments to pass to the Dart script.
293293
#
294294
# packages (optional):
295-
# The un-rebased path to the .packages file.
295+
# The un-rebased path to the package_config.json file.
296296
#
297297
# Forwarded to action() with the usual meaning:
298298
# depfile

‎runtime/tools/wiki/build/xrefs.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
Xref is a reference of form [`symbol`][] or [text][`symbol`], where symbol
88
is expected to be one of the following:
99
10-
* package:-scheme URI - it will be resolved using .packages file in the
11-
root directory
10+
* package:-scheme URI - it will be resolved using the
11+
.dart_tool/package_config.json file in the root directory
1212
* file path
1313
* C++ symbol - will be resolved through xref.json file (see README.md)
1414
@@ -85,7 +85,7 @@ def handleMatch(self, m, data):
8585

8686
def _resolve_ref(self, ref: str) -> Optional[str]:
8787
if ref.startswith('package:'):
88-
# Resolve as package uri via .packages.
88+
# Resolve as package uri via package_config.json.
8989
uri = urlparse(ref)
9090
(package_name, *path_to_file) = uri.path.split('/', 1)
9191
package_path = self.packages[package_name]

‎utils/aot_snapshot.gni‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ template("aot_snapshot") {
3333
if (defined(invoker.inputs)) {
3434
extra_inputs += invoker.inputs
3535
}
36-
if (defined(invoker.dot_packages)) {
37-
dot_packages = invoker.dot_packages
36+
if (defined(invoker.package_config)) {
37+
package_config = invoker.package_config
3838
} else {
39-
dot_packages = rebase_path("$_dart_root/.dart_tool/package_config.json")
39+
package_config = rebase_path("$_dart_root/.dart_tool/package_config.json")
4040
}
4141
output = "$root_out_dir/$name.snapshot"
4242
if (defined(invoker.output)) {
@@ -65,7 +65,7 @@ template("aot_snapshot") {
6565
gen_kernel_kernel,
6666
platform_dill,
6767
main_dart,
68-
dot_packages,
68+
package_config,
6969
]
7070
output = dill
7171
outputs = [ output ]
@@ -80,7 +80,7 @@ template("aot_snapshot") {
8080
script = gen_kernel_kernel
8181

8282
args = [
83-
"--packages=" + rebase_path(dot_packages, root_build_dir),
83+
"--packages=" + rebase_path(package_config, root_build_dir),
8484
"--platform=" + rebase_path(platform_dill, root_build_dir),
8585
"--aot",
8686
"--output=" + rebase_path(output, root_build_dir),

‎utils/application_snapshot.gni‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ declare_args() {
4646
# extra_inputs (optional):
4747
# Any extra build inputs.
4848
#
49-
# dot_packages (optional):
50-
# The .packages file for the app. Defaults to the $_dart_root/.packages.
49+
# package_config (optional):
50+
# The package_config.json file for the app.
51+
# Defaults to the $_dart_root/.dart_tool/package_config.json file.
5152
#
5253
# output (optional):
5354
# Overrides the full output path.
@@ -101,10 +102,10 @@ template("application_snapshot") {
101102
if (defined(invoker.inputs)) {
102103
extra_inputs += invoker.inputs
103104
}
104-
if (defined(invoker.dot_packages)) {
105-
dot_packages = invoker.dot_packages
105+
if (defined(invoker.package_config)) {
106+
package_config = invoker.package_config
106107
} else {
107-
dot_packages = rebase_path("$_dart_root/.dart_tool/package_config.json")
108+
package_config = rebase_path("$_dart_root/.dart_tool/package_config.json")
108109
}
109110
output = "$root_gen_dir/$name.dart.snapshot"
110111
if (defined(invoker.output)) {
@@ -136,7 +137,7 @@ template("application_snapshot") {
136137
gen_kernel_kernel,
137138
platform_dill,
138139
main_dart,
139-
dot_packages,
140+
package_config,
140141
]
141142
output = "$target_gen_dir/$name.dart.dill"
142143
outputs = [ output ]
@@ -152,7 +153,7 @@ template("application_snapshot") {
152153
is_product_flag = dart_runtime_mode == "release"
153154

154155
args = [
155-
"--packages=" + rebase_path(dot_packages, root_build_dir),
156+
"--packages=" + rebase_path(package_config, root_build_dir),
156157
"--platform=" + rebase_path(platform_dill, root_build_dir),
157158
"--no-aot",
158159
"--no-embed-sources",
@@ -204,7 +205,7 @@ template("application_snapshot") {
204205

205206
vm_args = [
206207
"--deterministic",
207-
"--packages=" + rebase_path(dot_packages, root_build_dir),
208+
"--packages=" + rebase_path(package_config, root_build_dir),
208209
"--snapshot=" + rebase_path(output, root_build_dir),
209210
"--snapshot-depfile=" + rebase_path(depfile, root_build_dir),
210211
] + snapshot_vm_args

‎utils/gen_kernel/BUILD.gn‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ prebuilt_dart_action("bootstrap_gen_kernel") {
1515
]
1616
gen_kernel_script = "$_dart_root/pkg/vm/bin/gen_kernel.dart"
1717
platform_dill = "$root_out_dir/vm_platform_strong.dill"
18-
dot_packages = rebase_path("$_dart_root/.dart_tool/package_config.json")
18+
package_config = rebase_path("$_dart_root/.dart_tool/package_config.json")
1919

2020
inputs = [
2121
gen_kernel_script,
2222
platform_dill,
23-
dot_packages,
23+
package_config,
2424
]
2525
output = "$target_gen_dir/bootstrap_gen_kernel.dill"
2626
outputs = [ output ]
@@ -34,7 +34,7 @@ prebuilt_dart_action("bootstrap_gen_kernel") {
3434
# Ensure gen_kernel.dart will use this SDK hash when consuming/producing kernel.
3535
"-Dsdk_hash=$sdk_hash",
3636

37-
"--packages=" + rebase_path(dot_packages, root_build_dir),
37+
"--packages=" + rebase_path(package_config, root_build_dir),
3838
]
3939
script = gen_kernel_script
4040
args = []

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /