mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 17:40:04 +00:00
Revert "Auto-generate the package_config.json file on gclient sync."
This reverts commit 92868580b4
.
Reason for revert: I'm seeing failures in golem:
ninja: error: '../../third_party/dart/.dart_tool/package_config.json', needed by 'vm_outline_strong.dill', missing and no known rule to make it
Original change's description:
> Auto-generate the package_config.json file on gclient sync.
>
> Change-Id: Ibb5e548c0738e7dd0061433cf054af8336a0683b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234320
> Reviewed-by: Alexander Thomas <athom@google.com>
> Reviewed-by: Lasse Nielsen <lrn@google.com>
> Commit-Queue: Devon Carew <devoncarew@google.com>
TBR=lrn@google.com,devoncarew@google.com,athom@google.com
Change-Id: Ic2b7ae3feedfa064ddbbdb0b36f0e3db088bf177
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234802
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
This commit is contained in:
parent
79a77e6da1
commit
c7680744b0
825
.dart_tool/package_config.json
Normal file
825
.dart_tool/package_config.json
Normal file
|
@ -0,0 +1,825 @@
|
||||||
|
{
|
||||||
|
"copyright": [
|
||||||
|
"Copyright (c) 2022, the Dart project authors. Please see the AUTHORS ",
|
||||||
|
"file for details. All rights reserved. Use of this source code is ",
|
||||||
|
"governed by a BSD-style license that can be found in the LICENSE file."
|
||||||
|
],
|
||||||
|
"comment": [
|
||||||
|
"Package configuration for all packages in /pkg, and checked out by DEPS",
|
||||||
|
"into /third_party/pkg and /third_party/pkg_tested.",
|
||||||
|
"If you add a package to DEPS or /pkg or change a package's SDK",
|
||||||
|
"constraint, update this by running tools/generate_package_config.dart."
|
||||||
|
],
|
||||||
|
"configVersion": 2,
|
||||||
|
"generator": "tools/generate_package_config.dart",
|
||||||
|
"packages": [
|
||||||
|
{
|
||||||
|
"name": "_fe_analyzer_shared",
|
||||||
|
"rootUri": "../pkg/_fe_analyzer_shared",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "_fe_analyzer_shared_assigned_variables",
|
||||||
|
"rootUri": "../pkg/_fe_analyzer_shared/test/flow_analysis/assigned_variables",
|
||||||
|
"packageUri": ".nonexisting/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "_fe_analyzer_shared_definite_assignment",
|
||||||
|
"rootUri": "../pkg/_fe_analyzer_shared/test/flow_analysis/definite_assignment",
|
||||||
|
"packageUri": ".nonexisting/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "_fe_analyzer_shared_definite_unassignment",
|
||||||
|
"rootUri": "../pkg/_fe_analyzer_shared/test/flow_analysis/definite_unassignment",
|
||||||
|
"packageUri": ".nonexisting/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "_fe_analyzer_shared_inheritance",
|
||||||
|
"rootUri": "../pkg/_fe_analyzer_shared/test/inheritance",
|
||||||
|
"packageUri": ".nonexisting/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "_fe_analyzer_shared_nullability",
|
||||||
|
"rootUri": "../pkg/_fe_analyzer_shared/test/flow_analysis/nullability",
|
||||||
|
"packageUri": ".nonexisting/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "_fe_analyzer_shared_reachability",
|
||||||
|
"rootUri": "../pkg/_fe_analyzer_shared/test/flow_analysis/reachability",
|
||||||
|
"packageUri": ".nonexisting/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "_fe_analyzer_shared_type_promotion",
|
||||||
|
"rootUri": "../pkg/_fe_analyzer_shared/test/flow_analysis/type_promotion",
|
||||||
|
"packageUri": ".nonexisting/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "_fe_analyzer_shared_why_not_promoted",
|
||||||
|
"rootUri": "../pkg/_fe_analyzer_shared/test/flow_analysis/why_not_promoted",
|
||||||
|
"packageUri": ".nonexisting/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "_js_interop_checks",
|
||||||
|
"rootUri": "../pkg/_js_interop_checks",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "analysis_server",
|
||||||
|
"rootUri": "../pkg/analysis_server",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.14"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "analysis_server_client",
|
||||||
|
"rootUri": "../pkg/analysis_server_client",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "analyzer",
|
||||||
|
"rootUri": "../pkg/analyzer",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.14"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "analyzer_cli",
|
||||||
|
"rootUri": "../pkg/analyzer_cli",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.14"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "analyzer_plugin",
|
||||||
|
"rootUri": "../pkg/analyzer_plugin",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.14"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "analyzer_utilities",
|
||||||
|
"rootUri": "../pkg/analyzer_utilities",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "args",
|
||||||
|
"rootUri": "../third_party/pkg/args",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "async",
|
||||||
|
"rootUri": "../third_party/pkg/async",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.14"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "async_helper",
|
||||||
|
"rootUri": "../pkg/async_helper",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "bazel_worker",
|
||||||
|
"rootUri": "../third_party/pkg/bazel_worker",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.14"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "benchmark_harness",
|
||||||
|
"rootUri": "../third_party/pkg/benchmark_harness",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "boolean_selector",
|
||||||
|
"rootUri": "../third_party/pkg/boolean_selector",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "browser_launcher",
|
||||||
|
"rootUri": "../third_party/pkg/browser_launcher",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "build_integration",
|
||||||
|
"rootUri": "../pkg/build_integration",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "characters",
|
||||||
|
"rootUri": "../third_party/pkg/characters",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "charcode",
|
||||||
|
"rootUri": "../third_party/pkg/charcode",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "cli_util",
|
||||||
|
"rootUri": "../third_party/pkg/cli_util",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "clock",
|
||||||
|
"rootUri": "../third_party/pkg/clock",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "collection",
|
||||||
|
"rootUri": "../third_party/pkg/collection",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "compiler",
|
||||||
|
"rootUri": "../pkg/compiler",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.6"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "convert",
|
||||||
|
"rootUri": "../third_party/pkg/convert",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "crypto",
|
||||||
|
"rootUri": "../third_party/pkg/crypto",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "csslib",
|
||||||
|
"rootUri": "../third_party/pkg/csslib",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dart2js_info",
|
||||||
|
"rootUri": "../pkg/dart2js_info",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.11"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dart2js_runtime_metrics",
|
||||||
|
"rootUri": "../pkg/dart2js_runtime_metrics",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.14"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dart2js_tools",
|
||||||
|
"rootUri": "../pkg/dart2js_tools",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dart2native",
|
||||||
|
"rootUri": "../pkg/dart2native",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dart2wasm",
|
||||||
|
"rootUri": "../pkg/dart2wasm",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dart_internal",
|
||||||
|
"rootUri": "../pkg/dart_internal",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dart_style",
|
||||||
|
"rootUri": "../third_party/pkg_tested/dart_style",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dartdev",
|
||||||
|
"rootUri": "../pkg/dartdev",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dartdoc",
|
||||||
|
"rootUri": "../third_party/pkg/dartdoc",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.14"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dds",
|
||||||
|
"rootUri": "../pkg/dds",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.13"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dds_service_extensions",
|
||||||
|
"rootUri": "../pkg/dds_service_extensions",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.13"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dev_compiler",
|
||||||
|
"rootUri": "../pkg/dev_compiler",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.15"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "devtools_shared",
|
||||||
|
"rootUri": "../third_party/devtools/devtools_shared",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "expect",
|
||||||
|
"rootUri": "../pkg/expect",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ffi",
|
||||||
|
"rootUri": "../third_party/pkg/ffi",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "file",
|
||||||
|
"rootUri": "../third_party/pkg/file/packages/file",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "file_testing",
|
||||||
|
"rootUri": "../third_party/pkg/file/packages/file_testing",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fixnum",
|
||||||
|
"rootUri": "../third_party/pkg/fixnum",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "front_end",
|
||||||
|
"rootUri": "../pkg/front_end",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.13"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "front_end_testcases",
|
||||||
|
"rootUri": "../pkg/front_end/testcases",
|
||||||
|
"packageUri": ".nonexisting/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "frontend_server",
|
||||||
|
"rootUri": "../pkg/frontend_server",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "frontend_server_client",
|
||||||
|
"rootUri": "../third_party/pkg/webdev/frontend_server_client",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "glob",
|
||||||
|
"rootUri": "../third_party/pkg/glob",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.15"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "html",
|
||||||
|
"rootUri": "../third_party/pkg/html",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "http",
|
||||||
|
"rootUri": "../third_party/pkg/http",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.14"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "http_io",
|
||||||
|
"rootUri": "../third_party/pkg_tested/http_io",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.5"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "http_multi_server",
|
||||||
|
"rootUri": "../third_party/pkg/http_multi_server",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "http_parser",
|
||||||
|
"rootUri": "../third_party/pkg/http_parser",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "intl",
|
||||||
|
"rootUri": "../third_party/pkg/intl",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.11"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "js",
|
||||||
|
"rootUri": "../pkg/js",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.16"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "js_ast",
|
||||||
|
"rootUri": "../pkg/js_ast",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.10"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "js_runtime",
|
||||||
|
"rootUri": "../pkg/js_runtime",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "json_rpc_2",
|
||||||
|
"rootUri": "../third_party/pkg/json_rpc_2",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "kernel",
|
||||||
|
"rootUri": "../pkg/kernel",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "language_versioning_2.7_test",
|
||||||
|
"rootUri": "../pkg/language_versioning_2.7_test",
|
||||||
|
"languageVersion": "2.7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linter",
|
||||||
|
"rootUri": "../third_party/pkg/linter",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "lints",
|
||||||
|
"rootUri": "../third_party/pkg/lints",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "logging",
|
||||||
|
"rootUri": "../third_party/pkg/logging",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "markdown",
|
||||||
|
"rootUri": "../third_party/pkg/markdown",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "matcher",
|
||||||
|
"rootUri": "../third_party/pkg/matcher",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "meta",
|
||||||
|
"rootUri": "../pkg/meta",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "mime",
|
||||||
|
"rootUri": "../third_party/pkg/mime",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "mockito",
|
||||||
|
"rootUri": "../third_party/pkg/mockito",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "modular_test",
|
||||||
|
"rootUri": "../pkg/modular_test",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "native_stack_traces",
|
||||||
|
"rootUri": "../pkg/native_stack_traces",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.14"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "nnbd_migration",
|
||||||
|
"rootUri": "../pkg/nnbd_migration",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.14"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "oauth2",
|
||||||
|
"rootUri": "../third_party/pkg/oauth2",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "observatory",
|
||||||
|
"rootUri": "../runtime/observatory",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "observatory_2",
|
||||||
|
"rootUri": "../runtime/observatory_2",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.6"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "observatory_test_package",
|
||||||
|
"rootUri": "../runtime/observatory/tests/service/observatory_test_package",
|
||||||
|
"languageVersion": "2.9"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "observatory_test_package_2",
|
||||||
|
"rootUri": "../runtime/observatory_2/tests/service_2/observatory_test_package_2",
|
||||||
|
"languageVersion": "2.7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "package_config",
|
||||||
|
"rootUri": "../third_party/pkg_tested/package_config",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "package_deps",
|
||||||
|
"rootUri": "../tools/package_deps",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "path",
|
||||||
|
"rootUri": "../third_party/pkg/path",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pedantic",
|
||||||
|
"rootUri": "../third_party/pkg/pedantic",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "platform",
|
||||||
|
"rootUri": "../third_party/pkg/platform",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pool",
|
||||||
|
"rootUri": "../third_party/pkg/pool",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "process",
|
||||||
|
"rootUri": "../third_party/pkg/process",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "protobuf",
|
||||||
|
"rootUri": "../third_party/pkg/protobuf/protobuf",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pub",
|
||||||
|
"rootUri": "../third_party/pkg/pub",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pub_semver",
|
||||||
|
"rootUri": "../third_party/pkg/pub_semver",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scrape",
|
||||||
|
"rootUri": "../pkg/scrape",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.13"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sdk_library_metadata",
|
||||||
|
"rootUri": "../sdk/lib/_internal/sdk_library_metadata",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "shelf",
|
||||||
|
"rootUri": "../third_party/pkg/shelf",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "shelf_packages_handler",
|
||||||
|
"rootUri": "../third_party/pkg/shelf_packages_handler",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "shelf_proxy",
|
||||||
|
"rootUri": "../third_party/pkg/shelf_proxy",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "shelf_static",
|
||||||
|
"rootUri": "../third_party/pkg/shelf_static",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "shelf_web_socket",
|
||||||
|
"rootUri": "../third_party/pkg/shelf_web_socket",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "smith",
|
||||||
|
"rootUri": "../pkg/smith",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "source_map_stack_trace",
|
||||||
|
"rootUri": "../third_party/pkg/source_map_stack_trace",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "source_maps",
|
||||||
|
"rootUri": "../third_party/pkg/source_maps",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "source_span",
|
||||||
|
"rootUri": "../third_party/pkg/source_span",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.14"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sourcemap_testing",
|
||||||
|
"rootUri": "../pkg/sourcemap_testing",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sse",
|
||||||
|
"rootUri": "../third_party/pkg/sse",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "stack_trace",
|
||||||
|
"rootUri": "../third_party/pkg/stack_trace",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "status_file",
|
||||||
|
"rootUri": "../pkg/status_file",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "stream_channel",
|
||||||
|
"rootUri": "../third_party/pkg/stream_channel",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.14"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "string_scanner",
|
||||||
|
"rootUri": "../third_party/pkg/string_scanner",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sync_http",
|
||||||
|
"rootUri": "../third_party/pkg/sync_http",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "telemetry",
|
||||||
|
"rootUri": "../pkg/telemetry",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "term_glyph",
|
||||||
|
"rootUri": "../third_party/pkg/term_glyph",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "test",
|
||||||
|
"rootUri": "../third_party/pkg/test/pkgs/test",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "test_api",
|
||||||
|
"rootUri": "../third_party/pkg/test/pkgs/test_api",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "test_core",
|
||||||
|
"rootUri": "../third_party/pkg/test/pkgs/test_core",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "test_descriptor",
|
||||||
|
"rootUri": "../third_party/pkg/test_descriptor",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "test_package",
|
||||||
|
"rootUri": "../pkg/vm_service/test/test_package",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "test_process",
|
||||||
|
"rootUri": "../third_party/pkg/test_process",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "test_reflective_loader",
|
||||||
|
"rootUri": "../third_party/pkg/test_reflective_loader",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "test_runner",
|
||||||
|
"rootUri": "../pkg/test_runner",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "testing",
|
||||||
|
"rootUri": "../pkg/testing",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "typed_data",
|
||||||
|
"rootUri": "../third_party/pkg/typed_data",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "usage",
|
||||||
|
"rootUri": "../third_party/pkg/usage",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "vector_math",
|
||||||
|
"rootUri": "../third_party/pkg/vector_math",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.14"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "vm",
|
||||||
|
"rootUri": "../pkg/vm",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.15"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "vm_service",
|
||||||
|
"rootUri": "../pkg/vm_service",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "vm_snapshot_analysis",
|
||||||
|
"rootUri": "../pkg/vm_snapshot_analysis",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "wasm_builder",
|
||||||
|
"rootUri": "../pkg/wasm_builder",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "watcher",
|
||||||
|
"rootUri": "../third_party/pkg/watcher",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.14"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "web_components",
|
||||||
|
"rootUri": "../third_party/pkg/web_components",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "1.9"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "web_socket_channel",
|
||||||
|
"rootUri": "../third_party/pkg/web_socket_channel",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "webdriver",
|
||||||
|
"rootUri": "../third_party/pkg/webdriver",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "webkit_inspection_protocol",
|
||||||
|
"rootUri": "../third_party/pkg/webkit_inspection_protocol",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "yaml",
|
||||||
|
"rootUri": "../third_party/pkg/yaml",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "yaml_edit",
|
||||||
|
"rootUri": "../third_party/pkg/yaml_edit",
|
||||||
|
"packageUri": "lib/",
|
||||||
|
"languageVersion": "2.12"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -75,10 +75,6 @@ client/tests/drt
|
||||||
packages
|
packages
|
||||||
pubspec.lock
|
pubspec.lock
|
||||||
|
|
||||||
# The top level package files (these are auto-generated per checkout)
|
|
||||||
/.dart_tool/package_config.json
|
|
||||||
/.packages
|
|
||||||
|
|
||||||
# Local pub storage
|
# Local pub storage
|
||||||
.pub
|
.pub
|
||||||
|
|
||||||
|
|
130
.packages
Normal file
130
.packages
Normal file
|
@ -0,0 +1,130 @@
|
||||||
|
# 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
|
||||||
|
# BSD-style license that can be found in the LICENSE file.
|
||||||
|
#
|
||||||
|
# This file is generated; do not edit. To re-generate, run:
|
||||||
|
# 'dart tools/generate_package_config.dart'.
|
||||||
|
|
||||||
|
_fe_analyzer_shared:pkg/_fe_analyzer_shared/lib
|
||||||
|
_js_interop_checks:pkg/_js_interop_checks/lib
|
||||||
|
analysis_server:pkg/analysis_server/lib
|
||||||
|
analysis_server_client:pkg/analysis_server_client/lib
|
||||||
|
analyzer:pkg/analyzer/lib
|
||||||
|
analyzer_cli:pkg/analyzer_cli/lib
|
||||||
|
analyzer_plugin:pkg/analyzer_plugin/lib
|
||||||
|
analyzer_utilities:pkg/analyzer_utilities/lib
|
||||||
|
args:third_party/pkg/args/lib
|
||||||
|
async:third_party/pkg/async/lib
|
||||||
|
async_helper:pkg/async_helper/lib
|
||||||
|
bazel_worker:third_party/pkg/bazel_worker/lib
|
||||||
|
benchmark_harness:third_party/pkg/benchmark_harness/lib
|
||||||
|
boolean_selector:third_party/pkg/boolean_selector/lib
|
||||||
|
browser_launcher:third_party/pkg/browser_launcher/lib
|
||||||
|
build_integration:pkg/build_integration/lib
|
||||||
|
characters:third_party/pkg/characters/lib
|
||||||
|
charcode:third_party/pkg/charcode/lib
|
||||||
|
cli_util:third_party/pkg/cli_util/lib
|
||||||
|
clock:third_party/pkg/clock/lib
|
||||||
|
collection:third_party/pkg/collection/lib
|
||||||
|
compiler:pkg/compiler/lib
|
||||||
|
convert:third_party/pkg/convert/lib
|
||||||
|
crypto:third_party/pkg/crypto/lib
|
||||||
|
csslib:third_party/pkg/csslib/lib
|
||||||
|
dart2js_info:pkg/dart2js_info/lib
|
||||||
|
dart2js_runtime_metrics:pkg/dart2js_runtime_metrics/lib
|
||||||
|
dart2js_tools:pkg/dart2js_tools/lib
|
||||||
|
dart2native:pkg/dart2native/lib
|
||||||
|
dart2wasm:pkg/dart2wasm/lib
|
||||||
|
dart_internal:pkg/dart_internal/lib
|
||||||
|
dart_style:third_party/pkg_tested/dart_style/lib
|
||||||
|
dartdev:pkg/dartdev/lib
|
||||||
|
dartdoc:third_party/pkg/dartdoc/lib
|
||||||
|
dds:pkg/dds/lib
|
||||||
|
dds_service_extensions:pkg/dds_service_extensions/lib
|
||||||
|
dev_compiler:pkg/dev_compiler/lib
|
||||||
|
devtools_shared:third_party/devtools/devtools_shared/lib
|
||||||
|
expect:pkg/expect/lib
|
||||||
|
ffi:third_party/pkg/ffi/lib
|
||||||
|
file:third_party/pkg/file/packages/file/lib
|
||||||
|
file_testing:third_party/pkg/file/packages/file_testing/lib
|
||||||
|
fixnum:third_party/pkg/fixnum/lib
|
||||||
|
front_end:pkg/front_end/lib
|
||||||
|
frontend_server:pkg/frontend_server/lib
|
||||||
|
frontend_server_client:third_party/pkg/webdev/frontend_server_client/lib
|
||||||
|
glob:third_party/pkg/glob/lib
|
||||||
|
html:third_party/pkg/html/lib
|
||||||
|
http:third_party/pkg/http/lib
|
||||||
|
http_io:third_party/pkg_tested/http_io/lib
|
||||||
|
http_multi_server:third_party/pkg/http_multi_server/lib
|
||||||
|
http_parser:third_party/pkg/http_parser/lib
|
||||||
|
intl:third_party/pkg/intl/lib
|
||||||
|
js:pkg/js/lib
|
||||||
|
js_ast:pkg/js_ast/lib
|
||||||
|
js_runtime:pkg/js_runtime/lib
|
||||||
|
json_rpc_2:third_party/pkg/json_rpc_2/lib
|
||||||
|
kernel:pkg/kernel/lib
|
||||||
|
linter:third_party/pkg/linter/lib
|
||||||
|
lints:third_party/pkg/lints/lib
|
||||||
|
logging:third_party/pkg/logging/lib
|
||||||
|
markdown:third_party/pkg/markdown/lib
|
||||||
|
matcher:third_party/pkg/matcher/lib
|
||||||
|
meta:pkg/meta/lib
|
||||||
|
mime:third_party/pkg/mime/lib
|
||||||
|
mockito:third_party/pkg/mockito/lib
|
||||||
|
modular_test:pkg/modular_test/lib
|
||||||
|
native_stack_traces:pkg/native_stack_traces/lib
|
||||||
|
nnbd_migration:pkg/nnbd_migration/lib
|
||||||
|
oauth2:third_party/pkg/oauth2/lib
|
||||||
|
observatory:runtime/observatory/lib
|
||||||
|
observatory_2:runtime/observatory_2/lib
|
||||||
|
package_config:third_party/pkg_tested/package_config/lib
|
||||||
|
path:third_party/pkg/path/lib
|
||||||
|
pedantic:third_party/pkg/pedantic/lib
|
||||||
|
platform:third_party/pkg/platform/lib
|
||||||
|
pool:third_party/pkg/pool/lib
|
||||||
|
process:third_party/pkg/process/lib
|
||||||
|
protobuf:third_party/pkg/protobuf/protobuf/lib
|
||||||
|
pub:third_party/pkg/pub/lib
|
||||||
|
pub_semver:third_party/pkg/pub_semver/lib
|
||||||
|
scrape:pkg/scrape/lib
|
||||||
|
sdk_library_metadata:sdk/lib/_internal/sdk_library_metadata/lib
|
||||||
|
shelf:third_party/pkg/shelf/lib
|
||||||
|
shelf_packages_handler:third_party/pkg/shelf_packages_handler/lib
|
||||||
|
shelf_proxy:third_party/pkg/shelf_proxy/lib
|
||||||
|
shelf_static:third_party/pkg/shelf_static/lib
|
||||||
|
shelf_web_socket:third_party/pkg/shelf_web_socket/lib
|
||||||
|
smith:pkg/smith/lib
|
||||||
|
source_map_stack_trace:third_party/pkg/source_map_stack_trace/lib
|
||||||
|
source_maps:third_party/pkg/source_maps/lib
|
||||||
|
source_span:third_party/pkg/source_span/lib
|
||||||
|
sourcemap_testing:pkg/sourcemap_testing/lib
|
||||||
|
sse:third_party/pkg/sse/lib
|
||||||
|
stack_trace:third_party/pkg/stack_trace/lib
|
||||||
|
status_file:pkg/status_file/lib
|
||||||
|
stream_channel:third_party/pkg/stream_channel/lib
|
||||||
|
string_scanner:third_party/pkg/string_scanner/lib
|
||||||
|
sync_http:third_party/pkg/sync_http/lib
|
||||||
|
telemetry:pkg/telemetry/lib
|
||||||
|
term_glyph:third_party/pkg/term_glyph/lib
|
||||||
|
test:third_party/pkg/test/pkgs/test/lib
|
||||||
|
test_api:third_party/pkg/test/pkgs/test_api/lib
|
||||||
|
test_core:third_party/pkg/test/pkgs/test_core/lib
|
||||||
|
test_descriptor:third_party/pkg/test_descriptor/lib
|
||||||
|
test_process:third_party/pkg/test_process/lib
|
||||||
|
test_reflective_loader:third_party/pkg/test_reflective_loader/lib
|
||||||
|
test_runner:pkg/test_runner/lib
|
||||||
|
testing:pkg/testing/lib
|
||||||
|
typed_data:third_party/pkg/typed_data/lib
|
||||||
|
usage:third_party/pkg/usage/lib
|
||||||
|
vector_math:third_party/pkg/vector_math/lib
|
||||||
|
vm:pkg/vm/lib
|
||||||
|
vm_service:pkg/vm_service/lib
|
||||||
|
vm_snapshot_analysis:pkg/vm_snapshot_analysis/lib
|
||||||
|
wasm_builder:pkg/wasm_builder/lib
|
||||||
|
watcher:third_party/pkg/watcher/lib
|
||||||
|
web_components:third_party/pkg/web_components/lib
|
||||||
|
web_socket_channel:third_party/pkg/web_socket_channel/lib
|
||||||
|
webdriver:third_party/pkg/webdriver/lib
|
||||||
|
webkit_inspection_protocol:third_party/pkg/webkit_inspection_protocol/lib
|
||||||
|
yaml:third_party/pkg/yaml/lib
|
||||||
|
yaml_edit:third_party/pkg/yaml_edit/lib
|
6
DEPS
6
DEPS
|
@ -697,12 +697,6 @@ deps_os = {
|
||||||
}
|
}
|
||||||
|
|
||||||
hooks = [
|
hooks = [
|
||||||
{
|
|
||||||
# Generate the .dart_tool/package_confg.json file.
|
|
||||||
'name': 'Generate .dart_tool/package_confg.json',
|
|
||||||
'pattern': '.',
|
|
||||||
'action': ['python3', 'sdk/tools/generate_package_config.py'],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
# Pull Debian sysroot for i386 Linux
|
# Pull Debian sysroot for i386 Linux
|
||||||
'name': 'sysroot_i386',
|
'name': 'sysroot_i386',
|
||||||
|
|
26
PRESUBMIT.py
26
PRESUBMIT.py
|
@ -237,6 +237,31 @@ def _CheckStatusFiles(input_api, output_api):
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
|
def _CheckPackageConfigUpToDate(input_api, output_api):
|
||||||
|
"""Checks that .dart_tool/package_config.json is up to date."""
|
||||||
|
# Run only if DEPS file or package_config.json have been modified.
|
||||||
|
if not any(p == 'DEPS' or p == '.dart_tool/package_config.json' or
|
||||||
|
p.endswith('pubspec.yaml') for p in input_api.LocalPaths()):
|
||||||
|
return []
|
||||||
|
local_root = input_api.change.RepositoryRoot()
|
||||||
|
utils = imp.load_source('utils',
|
||||||
|
os.path.join(local_root, 'tools', 'utils.py'))
|
||||||
|
|
||||||
|
dart = utils.CheckedInSdkExecutable()
|
||||||
|
generate = os.path.join(local_root, 'tools', 'generate_package_config.dart')
|
||||||
|
cmd = [dart, generate, '--check']
|
||||||
|
result = subprocess.run(cmd, shell=utils.IsWindows())
|
||||||
|
if result.returncode != 0:
|
||||||
|
return [
|
||||||
|
output_api.PresubmitError(
|
||||||
|
'File .dart_tool/package_config.json is out of date.\n'
|
||||||
|
'Fix these issues with:\n'
|
||||||
|
'gclient sync -D && %s tools/generate_package_config.dart' %
|
||||||
|
(dart))
|
||||||
|
]
|
||||||
|
return []
|
||||||
|
|
||||||
|
|
||||||
def _CheckValidHostsInDEPS(input_api, output_api):
|
def _CheckValidHostsInDEPS(input_api, output_api):
|
||||||
"""Checks that DEPS file deps are from allowed_hosts."""
|
"""Checks that DEPS file deps are from allowed_hosts."""
|
||||||
# Run only if DEPS file has been modified to annoy fewer bystanders.
|
# Run only if DEPS file has been modified to annoy fewer bystanders.
|
||||||
|
@ -357,6 +382,7 @@ def _CommonChecks(input_api, output_api):
|
||||||
results.extend(_CheckLayering(input_api, output_api))
|
results.extend(_CheckLayering(input_api, output_api))
|
||||||
results.extend(_CheckClangTidy(input_api, output_api))
|
results.extend(_CheckClangTidy(input_api, output_api))
|
||||||
results.extend(_CheckTestMatrixValid(input_api, output_api))
|
results.extend(_CheckTestMatrixValid(input_api, output_api))
|
||||||
|
results.extend(_CheckPackageConfigUpToDate(input_api, output_api))
|
||||||
results.extend(
|
results.extend(
|
||||||
input_api.canned_checks.CheckPatchFormatted(input_api, output_api))
|
input_api.canned_checks.CheckPatchFormatted(input_api, output_api))
|
||||||
return results
|
return results
|
||||||
|
|
|
@ -3559,6 +3559,14 @@
|
||||||
"tools/package_deps/bin/package_deps.dart"
|
"tools/package_deps/bin/package_deps.dart"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "validate .dart_tool/package_config.json",
|
||||||
|
"script": "tools/sdks/dart-sdk/bin/dart",
|
||||||
|
"arguments": [
|
||||||
|
"tools/generate_package_config.dart",
|
||||||
|
"--check"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "build dart",
|
"name": "build dart",
|
||||||
"script": "tools/build.py",
|
"script": "tools/build.py",
|
||||||
|
|
|
@ -1,80 +1,136 @@
|
||||||
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
|
#!/usr/bin/env dart
|
||||||
// for details. All rights reserved. Use of this source code is governed by a
|
|
||||||
// BSD-style license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
/// Generates the repo's ".dart_tool/package_config.json" file.
|
/// Generates the repo's ".dart_tool/package_config.json" file.
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
// Important! Do not add package: imports to this file.
|
import 'package:args/args.dart';
|
||||||
// Do not add relative deps for libraries that themselves use package deps.
|
import 'package:path/path.dart' as p;
|
||||||
// This tool runs before the .dart_tool/package_config.json file is created, so
|
import 'package:pub_semver/pub_semver.dart';
|
||||||
// can not itself use package references.
|
import 'package:yaml/yaml.dart';
|
||||||
|
|
||||||
final repoRoot = dirname(dirname(fromUri(Platform.script)));
|
bool _parseOptions(List<String> args) {
|
||||||
|
const usage = "Usage: dart generate_package_config.dart [flags...]";
|
||||||
|
|
||||||
|
var parser = ArgParser();
|
||||||
|
|
||||||
|
parser.addFlag("help", abbr: "h");
|
||||||
|
|
||||||
|
parser.addFlag("check",
|
||||||
|
abbr: "c",
|
||||||
|
help: "Return with a non-zero exit code if not up-to-date",
|
||||||
|
negatable: false);
|
||||||
|
|
||||||
|
var results = parser.parse(args);
|
||||||
|
|
||||||
|
if (results["help"] as bool) {
|
||||||
|
print("Regenerate the .dart_tool/package_config.json file.");
|
||||||
|
print("");
|
||||||
|
print(usage);
|
||||||
|
print("");
|
||||||
|
print(parser.usage);
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return results["check"] as bool;
|
||||||
|
}
|
||||||
|
|
||||||
|
final repoRoot = p.dirname(p.dirname(p.fromUri(Platform.script)));
|
||||||
|
final configFilePath = p.join(repoRoot, '.dart_tool/package_config.json');
|
||||||
|
|
||||||
void main(List<String> args) {
|
void main(List<String> args) {
|
||||||
|
bool checkOnly = _parseOptions(args);
|
||||||
|
|
||||||
var packageDirs = [
|
var packageDirs = [
|
||||||
...listSubdirectories(platform('pkg')),
|
...listSubdirectories('pkg'),
|
||||||
...listSubdirectories(platform('third_party/pkg_tested')),
|
...listSubdirectories('third_party/pkg'),
|
||||||
...listSubdirectories(platform('third_party/pkg')),
|
...listSubdirectories('third_party/pkg_tested'),
|
||||||
...listSubdirectories(platform('third_party/pkg/file/packages')),
|
...listSubdirectories('third_party/pkg/file/packages'),
|
||||||
...listSubdirectories(platform('third_party/pkg/test/pkgs')),
|
...listSubdirectories('third_party/pkg/test/pkgs'),
|
||||||
platform('pkg/vm_service/test/test_package'),
|
packageDirectory('runtime/observatory'),
|
||||||
platform('runtime/observatory_2'),
|
packageDirectory(
|
||||||
platform(
|
'runtime/observatory/tests/service/observatory_test_package'),
|
||||||
|
packageDirectory('runtime/observatory_2'),
|
||||||
|
packageDirectory(
|
||||||
'runtime/observatory_2/tests/service_2/observatory_test_package_2'),
|
'runtime/observatory_2/tests/service_2/observatory_test_package_2'),
|
||||||
platform('runtime/observatory'),
|
packageDirectory('pkg/vm_service/test/test_package'),
|
||||||
platform('runtime/observatory/tests/service/observatory_test_package'),
|
packageDirectory('sdk/lib/_internal/sdk_library_metadata'),
|
||||||
platform('sdk/lib/_internal/sdk_library_metadata'),
|
packageDirectory('third_party/devtools/devtools_shared'),
|
||||||
platform('third_party/devtools/devtools_shared'),
|
packageDirectory('third_party/pkg/protobuf/protobuf'),
|
||||||
platform('third_party/pkg/protobuf/protobuf'),
|
packageDirectory('third_party/pkg/webdev/frontend_server_client'),
|
||||||
platform('third_party/pkg/webdev/frontend_server_client'),
|
packageDirectory('tools/package_deps'),
|
||||||
platform('tools/package_deps'),
|
|
||||||
];
|
];
|
||||||
|
|
||||||
var cfePackageDirs = [
|
var cfePackageDirs = [
|
||||||
platform('pkg/front_end/testcases'),
|
packageDirectory('pkg/front_end/testcases/'),
|
||||||
];
|
];
|
||||||
|
|
||||||
var feAnalyzerSharedPackageDirs = [
|
var feAnalyzerSharedPackageDirs = [
|
||||||
platform('pkg/_fe_analyzer_shared/test/flow_analysis/assigned_variables'),
|
packageDirectory(
|
||||||
platform('pkg/_fe_analyzer_shared/test/flow_analysis/definite_assignment'),
|
'pkg/_fe_analyzer_shared/test/flow_analysis/assigned_variables/'),
|
||||||
platform(
|
packageDirectory(
|
||||||
'pkg/_fe_analyzer_shared/test/flow_analysis/definite_unassignment'),
|
'pkg/_fe_analyzer_shared/test/flow_analysis/definite_assignment/'),
|
||||||
platform('pkg/_fe_analyzer_shared/test/flow_analysis/nullability'),
|
packageDirectory(
|
||||||
platform('pkg/_fe_analyzer_shared/test/flow_analysis/reachability'),
|
'pkg/_fe_analyzer_shared/test/flow_analysis/definite_unassignment/'),
|
||||||
platform('pkg/_fe_analyzer_shared/test/flow_analysis/type_promotion'),
|
packageDirectory('pkg/_fe_analyzer_shared/test/flow_analysis/nullability/'),
|
||||||
platform('pkg/_fe_analyzer_shared/test/flow_analysis/why_not_promoted'),
|
packageDirectory(
|
||||||
platform('pkg/_fe_analyzer_shared/test/inheritance'),
|
'pkg/_fe_analyzer_shared/test/flow_analysis/reachability/'),
|
||||||
|
packageDirectory(
|
||||||
|
'pkg/_fe_analyzer_shared/test/flow_analysis/type_promotion/'),
|
||||||
|
packageDirectory(
|
||||||
|
'pkg/_fe_analyzer_shared/test/flow_analysis/why_not_promoted//'),
|
||||||
|
packageDirectory('pkg/_fe_analyzer_shared/test/inheritance/'),
|
||||||
];
|
];
|
||||||
|
|
||||||
var packages = <Package>[
|
var packages = [
|
||||||
...makePackageConfigs(packageDirs),
|
...makePackageConfigs(packageDirs),
|
||||||
...makeCfePackageConfigs(cfePackageDirs),
|
...makeCfePackageConfigs(cfePackageDirs),
|
||||||
...makeFeAnalyzerSharedPackageConfigs(feAnalyzerSharedPackageDirs)
|
...makeFeAnalyzerSharedPackageConfigs(feAnalyzerSharedPackageDirs)
|
||||||
];
|
];
|
||||||
packages.sort((a, b) => a.name.compareTo(b.name));
|
packages.sort((a, b) => a['name']!.compareTo(b['name']!));
|
||||||
|
|
||||||
var configFile = File(join(repoRoot, '.dart_tool', 'package_config.json'));
|
var configFile = File(p.join(repoRoot, '.dart_tool', 'package_config.json'));
|
||||||
var packageConfig = PackageConfig(
|
var json = jsonDecode(configFile.readAsStringSync()) as Map<dynamic, dynamic>;
|
||||||
packages,
|
var oldPackages = json['packages'] as List<dynamic>;
|
||||||
extraData: {
|
|
||||||
'copyright': [
|
|
||||||
'Copyright (c) 2020, the Dart project authors. Please see the AUTHORS ',
|
|
||||||
'file for details. All rights reserved. Use of this source code is ',
|
|
||||||
'governed by a BSD-style license that can be found in the LICENSE file.',
|
|
||||||
],
|
|
||||||
'comment': [
|
|
||||||
'Package configuration for all packages in pkg/, third_party/pkg/, and',
|
|
||||||
'third_party/pkg_tested/',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
);
|
|
||||||
writeIfDifferent(configFile, packageConfig.generateJson('..'));
|
|
||||||
|
|
||||||
// Also generate the repo's .packages file.
|
if (checkOnly) {
|
||||||
var packagesFile = File(join(repoRoot, '.packages'));
|
// Validate the packages entry only, to avoid spurious failures from changes
|
||||||
|
// in the dates embedded in the other entries.
|
||||||
|
if (jsonEncode(packages) == jsonEncode(oldPackages)) {
|
||||||
|
print("Package config up to date.");
|
||||||
|
exit(0);
|
||||||
|
} else {
|
||||||
|
print("Package config out of date.");
|
||||||
|
print("Run `gclient sync -D && dart tools/generate_package_config.dart` "
|
||||||
|
"to update.");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var year = DateTime.now().year;
|
||||||
|
var config = <String, dynamic>{
|
||||||
|
'copyright': [
|
||||||
|
'Copyright (c) $year, the Dart project authors. Please see the AUTHORS ',
|
||||||
|
'file for details. All rights reserved. Use of this source code is ',
|
||||||
|
'governed by a BSD-style license that can be found in the LICENSE file.'
|
||||||
|
],
|
||||||
|
'comment': [
|
||||||
|
'Package configuration for all packages in /pkg, and checked out by DEPS',
|
||||||
|
'into /third_party/pkg and /third_party/pkg_tested.',
|
||||||
|
'If you add a package to DEPS or /pkg or change a package\'s SDK',
|
||||||
|
'constraint, update this by running tools/generate_package_config.dart.'
|
||||||
|
],
|
||||||
|
'configVersion': 2,
|
||||||
|
'generator': 'tools/generate_package_config.dart',
|
||||||
|
'packages': packages,
|
||||||
|
};
|
||||||
|
|
||||||
|
// TODO(rnystrom): Consider using package_config_v2 to generate this instead.
|
||||||
|
var jsonString = JsonEncoder.withIndent(' ').convert(config);
|
||||||
|
configFile.writeAsStringSync('$jsonString\n');
|
||||||
|
|
||||||
|
// Also generate the reop's .packages file.
|
||||||
|
var packagesFile = File(p.join(repoRoot, '.packages'));
|
||||||
var buffer = StringBuffer('''
|
var buffer = StringBuffer('''
|
||||||
# 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
|
||||||
|
@ -85,190 +141,114 @@ void main(List<String> args) {
|
||||||
|
|
||||||
''');
|
''');
|
||||||
for (var package in packages) {
|
for (var package in packages) {
|
||||||
final name = package.name;
|
final name = package['name'];
|
||||||
final rootUri = package.rootUri;
|
var path = package['rootUri']!;
|
||||||
final packageUri = package.packageUri;
|
if (path.startsWith('../')) {
|
||||||
|
path = path.substring('../'.length);
|
||||||
|
}
|
||||||
|
var packageUri = package['packageUri'];
|
||||||
|
if (packageUri != null && packageUri.endsWith('/')) {
|
||||||
|
packageUri = packageUri.substring(0, packageUri.length - 1);
|
||||||
|
}
|
||||||
if (packageUri != null && packageUri != '.nonexisting') {
|
if (packageUri != null && packageUri != '.nonexisting') {
|
||||||
buffer.writeln('$name:${posix(rootUri)}/${posix(packageUri)}');
|
buffer.writeln('$name:$path/$packageUri');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
writeIfDifferent(packagesFile, buffer.toString());
|
packagesFile.writeAsStringSync(buffer.toString());
|
||||||
}
|
|
||||||
|
|
||||||
/// Writes the given [contents] string to [file] if the contents are different
|
|
||||||
/// than what's currently in the file.
|
|
||||||
///
|
|
||||||
/// This updates the file to the given contents, while preserving the file
|
|
||||||
/// timestamp if there are no changes.
|
|
||||||
void writeIfDifferent(File file, String contents) {
|
|
||||||
if (!file.existsSync() || file.readAsStringSync() != contents) {
|
|
||||||
file.writeAsStringSync(contents);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Generates package configurations for each package in [packageDirs].
|
/// Generates package configurations for each package in [packageDirs].
|
||||||
Iterable<Package> makePackageConfigs(List<String> packageDirs) sync* {
|
Iterable<Map<String, String>> makePackageConfigs(
|
||||||
|
List<String> packageDirs) sync* {
|
||||||
for (var packageDir in packageDirs) {
|
for (var packageDir in packageDirs) {
|
||||||
var version = pubspecLanguageVersion(packageDir);
|
var version = pubspecLanguageVersion(packageDir);
|
||||||
var hasLibDirectory =
|
var hasLibDirectory = Directory(p.join(packageDir, 'lib')).existsSync();
|
||||||
Directory(join(repoRoot, packageDir, 'lib')).existsSync();
|
|
||||||
|
|
||||||
yield Package(
|
yield {
|
||||||
name: basename(packageDir),
|
'name': p.basename(packageDir),
|
||||||
rootUri: packageDir,
|
'rootUri': p
|
||||||
packageUri: hasLibDirectory ? 'lib/' : null,
|
.toUri(p.relative(packageDir, from: p.dirname(configFilePath)))
|
||||||
languageVersion: version,
|
.toString(),
|
||||||
);
|
if (hasLibDirectory) 'packageUri': 'lib/',
|
||||||
}
|
'languageVersion': '${version.major}.${version.minor}'
|
||||||
}
|
|
||||||
|
|
||||||
/// Generates package configurations for the special pseudo-packages used by the
|
|
||||||
/// CFE unit tests (`pkg/front_end/test/unit_test_suites.dart`).
|
|
||||||
Iterable<Package> makeCfePackageConfigs(List<String> packageDirs) sync* {
|
|
||||||
// TODO: Remove the use of '.nonexisting/'.
|
|
||||||
for (var packageDir in packageDirs) {
|
|
||||||
yield Package(
|
|
||||||
name: 'front_end_${basename(packageDir)}',
|
|
||||||
rootUri: packageDir,
|
|
||||||
packageUri: '.nonexisting/',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Generates package configurations for the special pseudo-packages used by the
|
|
||||||
/// _fe_analyzer_shared id tests.
|
|
||||||
Iterable<Package> makeFeAnalyzerSharedPackageConfigs(
|
|
||||||
List<String> packageDirs) sync* {
|
|
||||||
// TODO: Remove the use of '.nonexisting/'.
|
|
||||||
for (var packageDir in packageDirs) {
|
|
||||||
yield Package(
|
|
||||||
name: '_fe_analyzer_shared_${basename(packageDir)}',
|
|
||||||
rootUri: packageDir,
|
|
||||||
packageUri: '.nonexisting/',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Finds the paths of the immediate subdirectories of [dir] that
|
|
||||||
/// contain pubspecs.
|
|
||||||
Iterable<String> listSubdirectories(String dir) sync* {
|
|
||||||
for (var entry in Directory(join(repoRoot, dir)).listSync()) {
|
|
||||||
if (entry is! Directory) continue;
|
|
||||||
if (!File(join(entry.path, 'pubspec.yaml')).existsSync()) continue;
|
|
||||||
yield join(dir, basename(entry.path));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
final versionRE = RegExp(r"(?:\^|>=)(\d+\.\d+)");
|
|
||||||
|
|
||||||
/// Infers the language version from the SDK constraint in the pubspec for
|
|
||||||
/// [packageDir].
|
|
||||||
///
|
|
||||||
/// The version is returned in the form `major.minor`.
|
|
||||||
String? pubspecLanguageVersion(String packageDir) {
|
|
||||||
var pubspecFile = File(join(repoRoot, packageDir, 'pubspec.yaml'));
|
|
||||||
|
|
||||||
if (!pubspecFile.existsSync()) {
|
|
||||||
print("Error: Missing pubspec for $packageDir.");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
var contents = pubspecFile.readAsLinesSync();
|
|
||||||
if (!contents.any((line) => line.contains('sdk: '))) {
|
|
||||||
print("Error: Pubspec for $packageDir has no SDK constraint.");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Handle either "sdk: >=2.14.0 <3.0.0" or "sdk: ^2.3.0".
|
|
||||||
var sdkConstraint = contents.firstWhere((line) => line.contains('sdk: '));
|
|
||||||
sdkConstraint = sdkConstraint.trim().substring('sdk:'.length).trim();
|
|
||||||
if (sdkConstraint.startsWith('"') || sdkConstraint.startsWith("'")) {
|
|
||||||
sdkConstraint = sdkConstraint.substring(1, sdkConstraint.length - 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
var match = versionRE.firstMatch(sdkConstraint);
|
|
||||||
if (match == null) {
|
|
||||||
print("Error: unknown version range for $packageDir: '$sdkConstraint'.");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
return match[1]!;
|
|
||||||
}
|
|
||||||
|
|
||||||
class Package {
|
|
||||||
final String name;
|
|
||||||
final String rootUri;
|
|
||||||
final String? packageUri;
|
|
||||||
final String? languageVersion;
|
|
||||||
|
|
||||||
Package({
|
|
||||||
required this.name,
|
|
||||||
required this.rootUri,
|
|
||||||
this.packageUri,
|
|
||||||
this.languageVersion,
|
|
||||||
});
|
|
||||||
|
|
||||||
Map<String, Object?> toMap(String relativeTo) {
|
|
||||||
return {
|
|
||||||
'name': name,
|
|
||||||
'rootUri': posix(join(relativeTo, rootUri)),
|
|
||||||
if (packageUri != null) 'packageUri': posix(packageUri!),
|
|
||||||
if (languageVersion != null) 'languageVersion': languageVersion,
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class PackageConfig {
|
/// Generates package configurations for the special pseudo-packages used by
|
||||||
final List<Package> packages;
|
/// the CFE unit tests (`pkg/front_end/test/unit_test_suites.dart`).
|
||||||
final Map<String, Object?>? extraData;
|
Iterable<Map<String, String>> makeCfePackageConfigs(
|
||||||
|
List<String> packageDirs) sync* {
|
||||||
PackageConfig(this.packages, {this.extraData});
|
for (var packageDir in packageDirs) {
|
||||||
|
yield {
|
||||||
String generateJson(String relativeTo) {
|
'name': 'front_end_${p.basename(packageDir)}',
|
||||||
var config = <String, Object?>{};
|
'rootUri': p
|
||||||
if (extraData != null) {
|
.toUri(p.relative(packageDir, from: p.dirname(configFilePath)))
|
||||||
for (var key in extraData!.keys) {
|
.toString(),
|
||||||
config[key] = extraData![key];
|
'packageUri': '.nonexisting/',
|
||||||
}
|
};
|
||||||
}
|
|
||||||
config['configVersion'] = 2;
|
|
||||||
config['generator'] = 'tools/generate_package_config.dart';
|
|
||||||
config['packages'] =
|
|
||||||
packages.map((package) => package.toMap(relativeTo)).toList();
|
|
||||||
var jsonString = JsonEncoder.withIndent(' ').convert(config);
|
|
||||||
return '$jsonString\n';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Below are some (very simplified) versions of the package:path functions.
|
/// Generates package configurations for the special pseudo-packages used by
|
||||||
|
/// the _fe_analyzer_shared id tests.
|
||||||
final String _separator = Platform.pathSeparator;
|
Iterable<Map<String, String>> makeFeAnalyzerSharedPackageConfigs(
|
||||||
|
List<String> packageDirs) sync* {
|
||||||
String dirname(String s) {
|
for (var packageDir in packageDirs) {
|
||||||
return s.substring(0, s.lastIndexOf(_separator));
|
yield {
|
||||||
}
|
'name': '_fe_analyzer_shared_${p.basename(packageDir)}',
|
||||||
|
'rootUri': p
|
||||||
String join(String s1, String s2, [String? s3]) {
|
.toUri(p.relative(packageDir, from: p.dirname(configFilePath)))
|
||||||
if (s3 != null) {
|
.toString(),
|
||||||
return join(join(s1, s2), s3);
|
'packageUri': '.nonexisting/',
|
||||||
} else {
|
};
|
||||||
return s1.endsWith(_separator) ? '$s1$s2' : '$s1$_separator$s2';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String basename(String s) {
|
/// Generates a path to [relativePath] within the repo.
|
||||||
while (s.endsWith(_separator)) {
|
String packageDirectory(String relativePath) => p.join(repoRoot, relativePath);
|
||||||
s = s.substring(0, s.length - 1);
|
|
||||||
|
/// Finds the paths of the immediate subdirectories of [packagesDir] that
|
||||||
|
/// contain pubspecs.
|
||||||
|
Iterable<String> listSubdirectories(String packagesDir) sync* {
|
||||||
|
for (var entry in Directory(p.join(repoRoot, packagesDir)).listSync()) {
|
||||||
|
if (entry is! Directory) continue;
|
||||||
|
if (!File(p.join(entry.path, 'pubspec.yaml')).existsSync()) continue;
|
||||||
|
yield entry.path;
|
||||||
}
|
}
|
||||||
return s.substring(s.lastIndexOf(_separator) + 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String fromUri(Uri uri) => uri.toFilePath();
|
/// Infers the language version from the SDK constraint in the pubspec for
|
||||||
|
/// [packageDir].
|
||||||
|
Version pubspecLanguageVersion(String packageDir) {
|
||||||
|
final dartVersion2 = Version.parse('2.0.0');
|
||||||
|
|
||||||
/// Given a platform path, return a posix one.
|
var pubspecFile = File(p.join(packageDir, 'pubspec.yaml'));
|
||||||
String posix(String s) =>
|
var relative = p.relative(packageDir, from: repoRoot);
|
||||||
Platform.isWindows ? s.replaceAll(_separator, '/') : s;
|
|
||||||
|
|
||||||
/// Given a posix path, return a platform one.
|
if (!pubspecFile.existsSync()) {
|
||||||
String platform(String s) =>
|
print("Error: Missing pubspec for $relative.");
|
||||||
Platform.isWindows ? s.replaceAll('/', _separator) : s;
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
var pubspec =
|
||||||
|
loadYaml(pubspecFile.readAsStringSync()) as Map<dynamic, dynamic>;
|
||||||
|
if (!pubspec.containsKey('environment')) {
|
||||||
|
print("Error: Pubspec for $relative has no SDK constraint.");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
var environment = pubspec['environment'] as Map<dynamic, dynamic>;
|
||||||
|
if (!environment.containsKey('sdk')) {
|
||||||
|
print("Error: Pubspec for $relative has no SDK constraint.");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
var sdkConstraint = VersionConstraint.parse(environment['sdk'] as String);
|
||||||
|
if (sdkConstraint is VersionRange) {
|
||||||
|
return sdkConstraint.min ?? dartVersion2;
|
||||||
|
}
|
||||||
|
|
||||||
|
print("Error: SDK constraint $relative is not a version range.");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
# Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
|
||||||
# for details. All rights reserved. Use of this source code is governed by a
|
|
||||||
# BSD-style license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
# Invoke the `tools/generate_package_config.dart` script.
|
|
||||||
|
|
||||||
import os
|
|
||||||
import os.path
|
|
||||||
import platform
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
|
|
||||||
USE_PYTHON3 = True
|
|
||||||
|
|
||||||
|
|
||||||
def is_windows():
|
|
||||||
os_id = platform.system()
|
|
||||||
return os_id == 'Windows'
|
|
||||||
|
|
||||||
|
|
||||||
def checked_in_sdk_path():
|
|
||||||
tools_dir = os.path.dirname(os.path.realpath(__file__))
|
|
||||||
return os.path.join(tools_dir, 'sdks', 'dart-sdk')
|
|
||||||
|
|
||||||
|
|
||||||
def checked_in_sdk_executable():
|
|
||||||
name = 'dart'
|
|
||||||
if is_windows():
|
|
||||||
name = 'dart.exe'
|
|
||||||
return os.path.join(checked_in_sdk_path(), 'bin', name)
|
|
||||||
|
|
||||||
|
|
||||||
def generate_package_config():
|
|
||||||
tools_dir = os.path.dirname(os.path.realpath(__file__))
|
|
||||||
process = subprocess.run([
|
|
||||||
checked_in_sdk_executable(),
|
|
||||||
os.path.join(tools_dir, 'generate_package_config.dart')
|
|
||||||
])
|
|
||||||
return process.returncode
|
|
||||||
|
|
||||||
|
|
||||||
def Main():
|
|
||||||
sys.exit(generate_package_config())
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
Main()
|
|
Loading…
Reference in a new issue