forked from firka/flutter
Fix dot package references (flutter/engine#34174)
Don't use .packages -> use .dart_tool/package_config.json
This commit is contained in:
@@ -41,7 +41,7 @@ class CleanCommand extends Command<bool> with ArgUtils<bool> {
|
||||
final List<io.FileSystemEntity> thingsToBeCleaned = <io.FileSystemEntity>[
|
||||
environment.webUiDartToolDir,
|
||||
environment.webUiBuildDir,
|
||||
io.File(path.join(environment.webUiRootDir.path, '.packages')),
|
||||
io.File(path.join(environment.webUiRootDir.path, '.dart_tool', 'package_config.json')),
|
||||
io.File(path.join(environment.webUiRootDir.path, 'pubspec.lock')),
|
||||
if (_alsoCleanNinja)
|
||||
environment.outDir,
|
||||
|
||||
@@ -116,9 +116,9 @@ else
|
||||
install_deps
|
||||
mkdir -p $DART_TOOL_DIR
|
||||
|
||||
"$DART_SDK_DIR/bin/dart" --snapshot="$SNAPSHOT_PATH" --packages="$WEB_UI_DIR/.packages" "$SCRIPT_PATH"
|
||||
"$DART_SDK_DIR/bin/dart" --snapshot="$SNAPSHOT_PATH" --packages="$WEB_UI_DIR/.dart_tool/package_config.json" "$SCRIPT_PATH"
|
||||
echo "$REVISION" > "$STAMP_PATH"
|
||||
fi
|
||||
|
||||
$DART_SDK_DIR/bin/dart --packages="$WEB_UI_DIR/.packages" "$SNAPSHOT_PATH" $@
|
||||
$DART_SDK_DIR/bin/dart --packages="$WEB_UI_DIR/.dart_tool/package_config.json" "$SNAPSHOT_PATH" $@
|
||||
fi
|
||||
|
||||
@@ -57,13 +57,13 @@ cd %WEB_UI_DIR%
|
||||
IF NOT EXIST "%SNAPSHOT_PATH%" (
|
||||
ECHO Precompiling felt snapshot
|
||||
CALL %PUB_BIN% get
|
||||
%DART_BIN% --snapshot="%SNAPSHOT_PATH%" --packages="%WEB_UI_DIR%\.packages" %FELT_PATH%
|
||||
%DART_BIN% --snapshot="%SNAPSHOT_PATH%" --packages="%WEB_UI_DIR%\.dart_tool\package_config.json" %FELT_PATH%
|
||||
)
|
||||
|
||||
IF %1==test (
|
||||
%DART_SDK_DIR%\bin\dart --packages="%WEB_UI_DIR%\.packages" "%SNAPSHOT_PATH%" %* --browser=chrome
|
||||
%DART_SDK_DIR%\bin\dart --packages="%WEB_UI_DIR%\.dart_tool\package_config.json" "%SNAPSHOT_PATH%" %* --browser=chrome
|
||||
) ELSE (
|
||||
%DART_SDK_DIR%\bin\dart --packages="%WEB_UI_DIR%\.packages" "%SNAPSHOT_PATH%" %*
|
||||
%DART_SDK_DIR%\bin\dart --packages="%WEB_UI_DIR%\.dart_tool\package_config.json" "%SNAPSHOT_PATH%" %*
|
||||
)
|
||||
|
||||
EXIT /B %ERRORLEVEL%
|
||||
|
||||
@@ -47,7 +47,7 @@ foreach(test, tests) {
|
||||
compile_flutter_dart_test("compile_$test") {
|
||||
dart_file = test
|
||||
dart_kernel = "$root_gen_dir/$test.dill"
|
||||
packages = ".packages"
|
||||
packages = ".dart_tool/package_config.json"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ foreach(test, tests) {
|
||||
compile_flutter_dart_test("compile_$test") {
|
||||
dart_file = test
|
||||
dart_kernel = "$root_gen_dir/$test.dill"
|
||||
packages = "../.packages"
|
||||
packages = "../.dart_tool/package_config.json"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -680,7 +680,9 @@ def GatherDartTests(build_dir, filter, verbose_dart_snapshot):
|
||||
'%s/observatory/*_test.dart' % dart_tests_dir
|
||||
)
|
||||
dart_tests = glob.glob('%s/*_test.dart' % dart_tests_dir)
|
||||
test_packages = os.path.join(dart_tests_dir, '.packages')
|
||||
test_packages = os.path.join(
|
||||
dart_tests_dir, '.dart_tool', 'package_config.json'
|
||||
)
|
||||
|
||||
if 'release' not in build_dir:
|
||||
for dart_test_file in dart_observatory_tests:
|
||||
@@ -723,7 +725,8 @@ def GatherDartSmokeTest(build_dir, verbose_dart_snapshot):
|
||||
"fail_test.dart"
|
||||
)
|
||||
test_packages = os.path.join(
|
||||
buildroot_dir, "flutter", "testing", "smoke_test_failure", ".packages"
|
||||
buildroot_dir, "flutter", "testing", "smoke_test_failure", ".dart_tool",
|
||||
"package_config.json"
|
||||
)
|
||||
yield GatherDartTest(
|
||||
build_dir,
|
||||
|
||||
@@ -10,7 +10,7 @@ foreach(test, tests) {
|
||||
compile_flutter_dart_test("compile_$test") {
|
||||
dart_file = test
|
||||
dart_kernel = "$root_gen_dir/$test.dill"
|
||||
packages = ".packages"
|
||||
packages = ".dart_tool/package_config.json"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ final String basePath =
|
||||
final String fixtures = path.join(basePath, 'test', 'fixtures');
|
||||
final String box = path.join(fixtures, 'lib', 'box.dart');
|
||||
final String consts = path.join(fixtures, 'lib', 'consts.dart');
|
||||
final String dotPackages = path.join(fixtures, '.packages');
|
||||
final String packageConfig = path.join(fixtures, '.dart_tool', 'package_config.json');
|
||||
final String constsAndNon = path.join(fixtures, 'lib', 'consts_and_non.dart');
|
||||
final String boxDill = path.join(fixtures, 'box.dill');
|
||||
final String constsDill = path.join(fixtures, 'consts.dill');
|
||||
@@ -189,7 +189,7 @@ Future<void> main(List<String> args) async {
|
||||
'--target=flutter',
|
||||
'--aot',
|
||||
'--tfa',
|
||||
'--packages=$dotPackages',
|
||||
'--packages=$packageConfig',
|
||||
'--output-dill=$boxDill',
|
||||
box,
|
||||
]));
|
||||
@@ -200,7 +200,7 @@ Future<void> main(List<String> args) async {
|
||||
'--target=flutter',
|
||||
'--aot',
|
||||
'--tfa',
|
||||
'--packages=$dotPackages',
|
||||
'--packages=$packageConfig',
|
||||
'--output-dill=$constsDill',
|
||||
consts,
|
||||
]));
|
||||
@@ -211,7 +211,7 @@ Future<void> main(List<String> args) async {
|
||||
'--target=flutter',
|
||||
'--aot',
|
||||
'--tfa',
|
||||
'--packages=$dotPackages',
|
||||
'--packages=$packageConfig',
|
||||
'--output-dill=$constsAndNonDill',
|
||||
constsAndNon,
|
||||
]));
|
||||
|
||||
@@ -67,7 +67,7 @@ template("dart_package_config") {
|
||||
output_conversion = "json"
|
||||
}
|
||||
|
||||
# Converts the intermediate to a real pacakge_config.json file.
|
||||
# Converts the intermediate to a real package_config.json file.
|
||||
action(main_target) {
|
||||
forward_variables_from(invoker,
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user