From 45fc30af8d54e46b8f074afbdce83894a0b7a9d6 Mon Sep 17 00:00:00 2001 From: jonahwilliams Date: Tue, 7 Jul 2020 09:10:01 -0700 Subject: [PATCH 1/2] switch const finder to package_config --- tools/const_finder/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/const_finder/BUILD.gn b/tools/const_finder/BUILD.gn index 6aa045aeb591a..bcfe8d43f9c8c 100644 --- a/tools/const_finder/BUILD.gn +++ b/tools/const_finder/BUILD.gn @@ -6,7 +6,7 @@ import("//third_party/dart/utils/application_snapshot.gni") application_snapshot("const_finder") { main_dart = "bin/main.dart" - dot_packages = ".packages" + dot_packages = ".dart_tool/package_config.json" training_args = [ "--help" ] From edc9bfa2579691a5df50dbbfb00f431a73cbe25c Mon Sep 17 00:00:00 2001 From: jonahwilliams Date: Tue, 7 Jul 2020 09:20:31 -0700 Subject: [PATCH 2/2] update generation --- .../.dart_tool/package_config.json | 35 +++++++++---------- tools/run_third_party_dart.py | 1 + 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/tools/const_finder/.dart_tool/package_config.json b/tools/const_finder/.dart_tool/package_config.json index 5ca024b38e7ab..c0548411d61fd 100644 --- a/tools/const_finder/.dart_tool/package_config.json +++ b/tools/const_finder/.dart_tool/package_config.json @@ -2,37 +2,34 @@ "configVersion": 2, "packages": [ { - "name": "args", - "rootUri": "../../../../third_party/dart/third_party/pkg/args", - "packageUri": "lib/", - "languageVersion": "2.0" + "name": "const_finder", + "rootUri": "../", + "packageUri": "lib", + "languageVersion": "2.4" }, { "name": "kernel", "rootUri": "../../../../third_party/dart/pkg/kernel", - "packageUri": "lib/", + "packageUri": "lib", "languageVersion": "2.2" }, { "name": "meta", "rootUri": "../../../../third_party/dart/pkg/meta", - "packageUri": "lib/", - "languageVersion": "1.12" + "packageUri": "lib", + "languageVersion": "2.9" + }, + { + "name": "args", + "rootUri": "../../../../third_party/dart/third_party/pkg/args", + "packageUri": "lib", + "languageVersion": "2.3" }, { "name": "path", "rootUri": "../../../../third_party/dart/third_party/pkg/path", - "packageUri": "lib/", + "packageUri": "lib", "languageVersion": "2.0" - }, - { - "name": "const_finder", - "rootUri": "../", - "packageUri": "lib/", - "languageVersion": "2.4" } - ], - "generated": "2020-01-16T19:11:54.963296Z", - "generator": "pub", - "generatorVersion": "2.7.0" -} + ] +} \ No newline at end of file diff --git a/tools/run_third_party_dart.py b/tools/run_third_party_dart.py index 08df6b4a9b650..e1857da7df9cc 100644 --- a/tools/run_third_party_dart.py +++ b/tools/run_third_party_dart.py @@ -7,3 +7,4 @@ if __name__ == '__main__': subprocess.call(["src/third_party/dart/tools/sdks/dart-sdk/bin/dart", "pub", "global", "activate", "-spath", "./src/flutter/tools/generate_package_config"]) subprocess.call(["src/third_party/dart/tools/sdks/dart-sdk/bin/dart", "pub", "global", "run", "generate_package_config:generate_from_legacy", "src/flutter/flutter_frontend_server/.packages"]) + subprocess.call(["src/third_party/dart/tools/sdks/dart-sdk/bin/dart", "pub", "global", "run", "generate_package_config:generate_from_legacy", "src/flutter/tools/const_finder/.packages"]) \ No newline at end of file