Skip to content

Commit e8dafed

Browse files
athomasCommit Queue
authored andcommitted
[infra] Use empty package config for package config generator
Previously, stray package_config.json files could cause the package config generator to fail. Change-Id: If8dc81169a4f95f871572bde5c883a675ab3276b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401440 Commit-Queue: Sigurd Meldgaard <[email protected]> Commit-Queue: Alexander Thomas <[email protected]> Auto-Submit: Alexander Thomas <[email protected]> Reviewed-by: Sigurd Meldgaard <[email protected]>
1 parent cfbb695 commit e8dafed

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

tools/empty_package_config.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"copyright": [
3+
"Copyright (c) 2024, the Dart project authors. Please see the AUTHORS ",
4+
"file for details. All rights reserved. Use of this source code is ",
5+
"governed by a BSD-style license that can be found in the LICENSE file."
6+
],
7+
"comment": [
8+
"Empty package configuration, used to bootstrap generate_package_config.dart"
9+
],
10+
"configVersion": 2,
11+
"packages": []
12+
}

tools/generate_package_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def generate_package_config():
3535
tools_dir = os.path.dirname(os.path.realpath(__file__))
3636
process = subprocess.run([
3737
checked_in_sdk_executable(),
38+
'--packages=%s' % os.path.join(tools_dir, 'empty_package_config.json'),
3839
os.path.join(tools_dir, 'generate_package_config.dart')
3940
])
4041
return process.returncode

0 commit comments

Comments
 (0)