From 6ebd2633cd7bb68efb53d190780be377aeecdcc6 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Tue, 17 May 2022 01:22:25 +0000 Subject: [PATCH] Use `any` deps for all unpublished packages It should not be necessary to ever run `pub get` for a package which is not published. All packages used in the SDK are controlled by a single package config, so it's not necessary to declare versions or paths for any packages. Remove all dependency overrides. R=devoncarew@google.com Change-Id: Icb328813b471f35ee4c99995f4e90aac4d8ed438 Tested: Covered by existing static analysis. Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244767 Commit-Queue: Nate Bosch Reviewed-by: Alexander Aprelev Reviewed-by: Devon Carew --- pkg/_js_interop_checks/pubspec.yaml | 7 +- pkg/analysis_server/pubspec.yaml | 34 ++---- pkg/analyzer_cli/pubspec.yaml | 14 +-- pkg/analyzer_utilities/pubspec.yaml | 6 +- pkg/async_helper/pubspec.yaml | 3 +- pkg/build_integration/pubspec.yaml | 3 +- pkg/compiler/pubspec.yaml | 111 ++---------------- pkg/dart2js_info/pubspec.yaml | 16 +-- pkg/dart2js_runtime_metrics/pubspec.yaml | 4 +- pkg/dart2js_tools/pubspec.yaml | 12 +- pkg/dart2wasm/pubspec.yaml | 28 +---- pkg/dartdev/pubspec.yaml | 31 ++--- pkg/dev_compiler/pubspec.yaml | 47 ++------ pkg/expect/pubspec.yaml | 6 - pkg/front_end/pubspec.yaml | 51 +++----- pkg/frontend_server/pubspec.yaml | 25 ++-- pkg/js_ast/pubspec.yaml | 7 +- pkg/js_runtime/pubspec.yaml | 6 +- pkg/kernel/pubspec.yaml | 8 +- pkg/modular_test/pubspec.yaml | 7 +- pkg/nnbd_migration/pubspec.yaml | 33 ++---- pkg/scrape/pubspec.yaml | 7 +- pkg/smith/pubspec.yaml | 3 +- pkg/sourcemap_testing/pubspec.yaml | 9 +- pkg/status_file/pubspec.yaml | 9 +- pkg/telemetry/pubspec.yaml | 13 +- pkg/test_runner/pubspec.yaml | 33 ++---- pkg/vm/pubspec.yaml | 16 +-- .../tools/wiki/xref_extractor/pubspec.yaml | 2 +- tools/package_deps/bin/package_deps.dart | 25 ++-- 30 files changed, 169 insertions(+), 407 deletions(-) diff --git a/pkg/_js_interop_checks/pubspec.yaml b/pkg/_js_interop_checks/pubspec.yaml index 53c668a4929..776dab8d475 100644 --- a/pkg/_js_interop_checks/pubspec.yaml +++ b/pkg/_js_interop_checks/pubspec.yaml @@ -7,9 +7,4 @@ environment: dependencies: _fe_analyzer_shared: any - kernel: - path: ../kernel - -dependency_overrides: - _fe_analyzer_shared: - path: ../_fe_analyzer_shared + kernel: any diff --git a/pkg/analysis_server/pubspec.yaml b/pkg/analysis_server/pubspec.yaml index 00e4d9961bf..4b7314df27e 100644 --- a/pkg/analysis_server/pubspec.yaml +++ b/pkg/analysis_server/pubspec.yaml @@ -6,43 +6,29 @@ environment: sdk: '>=2.17.0 <3.0.0' dependencies: - _fe_analyzer_shared: - path: ../_fe_analyzer_shared - analyzer: - path: ../analyzer - analyzer_plugin: - path: ../analyzer_plugin + _fe_analyzer_shared: any + analyzer: any + analyzer_plugin: any args: any collection: any convert: any crypto: any dart_style: any - http: any html: any + http: any linter: any - meta: - path: ../meta - stream_channel: any - telemetry: - path: ../telemetry - test: any + meta: any path: any + stream_channel: any + telemetry: any + test: any watcher: any yaml: any dev_dependencies: - analyzer_utilities: - path: ../analyzer_utilities + analyzer_utilities: any cli_util: any - lints: ^2.0.0 + lints: any logging: any matcher: any test_reflective_loader: any - -dependency_overrides: - _fe_analyzer_shared: - path: ../_fe_analyzer_shared - analyzer: - path: ../analyzer - meta: - path: ../meta diff --git a/pkg/analyzer_cli/pubspec.yaml b/pkg/analyzer_cli/pubspec.yaml index 0580b815f79..60071144854 100644 --- a/pkg/analyzer_cli/pubspec.yaml +++ b/pkg/analyzer_cli/pubspec.yaml @@ -10,19 +10,13 @@ environment: dependencies: analyzer: any args: any - linter: ^1.0.0 + linter: any meta: any path: any - pub_semver: ^2.0.0 + pub_semver: any yaml: any dev_dependencies: lints: any - test_reflective_loader: ^0.2.0 - test: ^1.0.0 - -dependency_overrides: - analyzer: - path: ../analyzer - meta: - path: ../meta + test_reflective_loader: any + test: any diff --git a/pkg/analyzer_utilities/pubspec.yaml b/pkg/analyzer_utilities/pubspec.yaml index 2eac4b11c99..e974be1e1ad 100644 --- a/pkg/analyzer_utilities/pubspec.yaml +++ b/pkg/analyzer_utilities/pubspec.yaml @@ -6,11 +6,9 @@ environment: sdk: '>=2.12.0 <3.0.0' dependencies: - analyzer: - path: ../analyzer + analyzer: any html: any - meta: - path: ../meta + meta: any path: any test: any diff --git a/pkg/async_helper/pubspec.yaml b/pkg/async_helper/pubspec.yaml index f79d98ffea8..55bc80d807c 100644 --- a/pkg/async_helper/pubspec.yaml +++ b/pkg/async_helper/pubspec.yaml @@ -13,5 +13,4 @@ environment: sdk: '>=2.12.0 <3.0.0' dependencies: - expect: - path: ../expect + expect: any diff --git a/pkg/build_integration/pubspec.yaml b/pkg/build_integration/pubspec.yaml index 899a5edc526..2286f3e6ced 100644 --- a/pkg/build_integration/pubspec.yaml +++ b/pkg/build_integration/pubspec.yaml @@ -9,8 +9,7 @@ environment: sdk: '>=2.12.0 <3.0.0' dependencies: - front_end: - path: ../front_end + front_end: any dev_dependencies: test: any diff --git a/pkg/compiler/pubspec.yaml b/pkg/compiler/pubspec.yaml index d2e8bbbb293..22f0ac47c34 100644 --- a/pkg/compiler/pubspec.yaml +++ b/pkg/compiler/pubspec.yaml @@ -10,110 +10,25 @@ environment: # package. The `.packages` file in the repository root will be used by default. dependencies: _fe_analyzer_shared: any - # Published packages - repo version ensured via dependency_overrides + _js_interop_checks: any collection: any crypto: any - dart2js_info: - path: ../dart2js_info - front_end: - path: ../front_end - kernel: - path: ../kernel - - # Unpublished packages that can be used via path dependency - _js_interop_checks: - path: ../_js_interop_checks - js_ast: - path: ../js_ast - js_runtime: - path: ../js_runtime + dart2js_info: any + front_end: any + js_ast: any + js_runtime: any + kernel: any dev_dependencies: - # Published packages - repo version ensured via dependency_overrides args: any dart_style: any http: any - js: - path: ../js + js: any path: any source_maps: any - # Unpublished packages that can be used via path dependency - async_helper: - path: ../async_helper - dart2js_tools: - path: ../dart2js_tools - expect: - path: ../expect - modular_test: - path: ../modular_test - sourcemap_testing: - path: ../sourcemap_testing - testing: - path: ../testing - -dependency_overrides: - # Packages with source in the SDK - _fe_analyzer_shared: - path: ../_fe_analyzer_shared - analyzer: - path: ../analyzer - front_end: - path: ../front_end - js: - path: ../js - kernel: - path: ../kernel - meta: - path: ../meta - dart2js_info: - path: ../dart2js_info - smith: - path: ../smith - - # Packages brought in via DEPS - args: - path: ../../third_party/pkg/args - async: - path: ../../third_party/pkg/async - charcode: - path: ../../third_party/pkg/charcode - collection: - path: ../../third_party/pkg/collection - convert: - path: ../../third_party/pkg/convert - crypto: - path: ../../third_party/pkg/crypto - fixnum: - path: ../../third_party/pkg/fixnum - http_parser: - path: ../../third_party/pkg/http_parser - matcher: - path: ../../third_party/pkg/matcher - mime: - path: ../../third_party/pkg/mime - package_config: - path: ../../third_party/pkg_tested/package_config - path: - path: ../../third_party/pkg/path - protobuf: - path: ../../third_party/pkg/protobuf/protobuf - shelf: - path: ../../third_party/pkg/shelf/pkgs/shelf - shelf_static: - path: ../../third_party/pkg/shelf/pkgs/shelf_static - source_span: - path: ../../third_party/pkg/source_span - stack_trace: - path: ../../third_party/pkg/stack_trace - stream_channel: - path: ../../third_party/pkg/stream_channel - string_scanner: - path: ../../third_party/pkg/string_scanner - test: - path: ../../third_party/pkg/test/pkgs/test - test_api: - path: ../../third_party/pkg/test/pkgs/test_api - typed_data: - path: ../../third_party/pkg/typed_data - yaml: - path: ../../third_party/pkg/yaml + async_helper: any + dart2js_tools: any + expect: any + modular_test: any + sourcemap_testing: any + testing: any diff --git a/pkg/dart2js_info/pubspec.yaml b/pkg/dart2js_info/pubspec.yaml index fd83226eff2..2d8ff24d196 100644 --- a/pkg/dart2js_info/pubspec.yaml +++ b/pkg/dart2js_info/pubspec.yaml @@ -9,17 +9,17 @@ environment: sdk: '>=2.11.99 <3.0.0' dependencies: - args: ^2.3.0 - collection: ^1.10.1 - fixnum: '>=0.10.5 <2.0.0' - path: ^1.3.6 - protobuf: '>=1.0.1 <3.0.0' - shelf: ^1.2.0 - yaml: ^3.1.0 + args: any + collection: any + fixnum: any + path: any + protobuf: any + shelf: any + yaml: any dev_dependencies: lints: any - test: ^1.2.0 + test: any executables: dart2js_info: tools diff --git a/pkg/dart2js_runtime_metrics/pubspec.yaml b/pkg/dart2js_runtime_metrics/pubspec.yaml index 31c227f552e..8db98914bf6 100644 --- a/pkg/dart2js_runtime_metrics/pubspec.yaml +++ b/pkg/dart2js_runtime_metrics/pubspec.yaml @@ -12,6 +12,4 @@ environment: sdk: ">=2.14.0 <2.15.0" dev_dependencies: - # Unpublished packages that can be used via path dependency - expect: - path: ../expect + expect: any diff --git a/pkg/dart2js_tools/pubspec.yaml b/pkg/dart2js_tools/pubspec.yaml index 392ed5670a3..ec4d63ba13e 100644 --- a/pkg/dart2js_tools/pubspec.yaml +++ b/pkg/dart2js_tools/pubspec.yaml @@ -4,10 +4,12 @@ publish_to: none description: > Collection of tools used with dart2js including analyzing compilation information, deobfuscation of stack-traces and minified names. -dependencies: - path: any - source_maps: ^0.10.10 - source_span: any - stack_trace: ^1.9.3 + environment: sdk: '>=2.12.0 <3.0.0' + +dependencies: + path: any + source_maps: any + source_span: any + stack_trace: any diff --git a/pkg/dart2wasm/pubspec.yaml b/pkg/dart2wasm/pubspec.yaml index 8d6f9c29b4c..2c0f7117f0c 100644 --- a/pkg/dart2wasm/pubspec.yaml +++ b/pkg/dart2wasm/pubspec.yaml @@ -5,26 +5,8 @@ environment: sdk: '>=2.12.0' dependencies: - _js_interop_checks: - path: ../_js_interop_checks - front_end: - path: ../front_end - kernel: - path: ../kernel - vm: - path: ../vm - wasm_builder: - path: ../wasm_builder - -dependency_overrides: - # Packages with source in the SDK - _js_interop_checks: - path: ../_js_interop_checks - front_end: - path: ../front_end - kernel: - path: ../kernel - vm: - path: ../vm - wasm_builder: - path: ../wasm_builder + _js_interop_checks: any + front_end: any + kernel: any + vm: any + wasm_builder: any diff --git a/pkg/dartdev/pubspec.yaml b/pkg/dartdev/pubspec.yaml index 51e57b2aca6..2e719980a30 100644 --- a/pkg/dartdev/pubspec.yaml +++ b/pkg/dartdev/pubspec.yaml @@ -5,37 +5,28 @@ publish_to: none environment: sdk: '>=2.12.0 <3.0.0' + dependencies: - analysis_server: - path: ../analysis_server - analysis_server_client: - path: ../analysis_server_client - analyzer: - path: ../analyzer + analysis_server: any + analysis_server_client: any + analyzer: any args: any cli_util: any collection: any - dart2native: - path: ../dart2native + dart2native: any dart_style: any dartdoc: any - dds: - path: ../dds - front_end: - path: ../front_end - meta: - path: ../meta - nnbd_migration: - path: ../nnbd_migration + dds: any + front_end: any + meta: any + nnbd_migration: any path: any pub: any - telemetry: - path: ../telemetry + telemetry: any usage: any dev_dependencies: - expect: - path: ../expect + expect: any lints: any pub_semver: any test: any diff --git a/pkg/dev_compiler/pubspec.yaml b/pkg/dev_compiler/pubspec.yaml index 9ff430cdd21..5ec84aa49d5 100644 --- a/pkg/dev_compiler/pubspec.yaml +++ b/pkg/dev_compiler/pubspec.yaml @@ -7,51 +7,30 @@ environment: dependencies: _fe_analyzer_shared: any - _js_interop_checks: - path: ../_js_interop_checks + _js_interop_checks: any args: any async: any bazel_worker: any - build_integration: - path: ../build_integration - collection: ^1.15.0 - front_end: - path: ../front_end - kernel: - path: ../kernel + build_integration: any + collection: any + front_end: any + kernel: any meta: any path: any source_maps: any source_span: any dev_dependencies: - browser_launcher: ^1.0.0 - expect: - path: ../expect + browser_launcher: any + expect: any http_multi_server: any js: any lints: any - modular_test: - path: ../modular_test - sourcemap_testing: - path: ../sourcemap_testing - stack_trace: any + modular_test: any shelf: any + sourcemap_testing: any + stack_trace: any test: any - testing: - path: ../testing - vm: - path: ../vm - webkit_inspection_protocol: ^1.0.0 - -dependency_overrides: - _fe_analyzer_shared: - path: ../_fe_analyzer_shared - js: - path: ../js - meta: - path: ../meta - shelf: - path: ../../third_party/pkg/shelf/pkgs/shelf - http_multi_server: - path: ../../third_party/pkg/http_multi_server + testing: any + vm: any + webkit_inspection_protocol: any diff --git a/pkg/expect/pubspec.yaml b/pkg/expect/pubspec.yaml index 54c4ad12118..e231d0c33dc 100644 --- a/pkg/expect/pubspec.yaml +++ b/pkg/expect/pubspec.yaml @@ -14,9 +14,3 @@ environment: dependencies: meta: any smith: any - -dependency_overrides: - meta: - path: ../meta - smith: - path: ../smith diff --git a/pkg/front_end/pubspec.yaml b/pkg/front_end/pubspec.yaml index 47e743ce957..780e0c6f7b0 100644 --- a/pkg/front_end/pubspec.yaml +++ b/pkg/front_end/pubspec.yaml @@ -10,44 +10,25 @@ environment: dependencies: _fe_analyzer_shared: any - kernel: - path: ../kernel + kernel: any package_config: any dev_dependencies: analyzer: any - args: ^2.0.0 - async_helper: - path: ../async_helper - build_integration: - path: ../build_integration - compiler: - path: ../compiler - dart2wasm: - path: ../dart2wasm - dart_style: ^2.0.0 - dev_compiler: - path: ../dev_compiler - expect: - path: ../expect - json_rpc_2: ^3.0.0 - path: ^1.3.9 - test: ^1.3.4 - testing: - path: ../testing - test_reflective_loader: ^0.2.0 - vm: - path: ../vm + args: any + async_helper: any + build_integration: any + compiler: any + dart2wasm: any + dart_style: any + dev_compiler: any + expect: any + json_rpc_2: any + path: any + test: any + test_reflective_loader: any + testing: any + vm: any vm_service: any - web_socket_channel: ^2.0.0 + web_socket_channel: any yaml: any - -dependency_overrides: - analyzer: - path: ../analyzer - _fe_analyzer_shared: - path: ../_fe_analyzer_shared - package_config: - path: ../../third_party/pkg_tested/package_config - vm_service: - path: ../vm_service diff --git a/pkg/frontend_server/pubspec.yaml b/pkg/frontend_server/pubspec.yaml index 62f7446eaa4..9ce30114faf 100644 --- a/pkg/frontend_server/pubspec.yaml +++ b/pkg/frontend_server/pubspec.yaml @@ -7,24 +7,17 @@ environment: sdk: "^2.15.0" dependencies: - args: ^2.0.0 - _fe_analyzer_shared: - path: ../_fe_analyzer_shared - build_integration: - path: ../build_integration - compiler: - path: ../compiler - dev_compiler: - path: ../dev_compiler - front_end: - path: ../front_end - kernel: - path: ../kernel - package_config: ^2.0.0 + _fe_analyzer_shared: any + args: any + build_integration: any + compiler: any + dev_compiler: any + front_end: any + kernel: any + package_config: any path: any usage: any - vm: - path: ../vm + vm: any dev_dependencies: mockito: any diff --git a/pkg/js_ast/pubspec.yaml b/pkg/js_ast/pubspec.yaml index 4afc01e3cb1..7d23ea0d8b5 100644 --- a/pkg/js_ast/pubspec.yaml +++ b/pkg/js_ast/pubspec.yaml @@ -6,7 +6,6 @@ environment: sdk: '>=2.16.0 <3.0.0' dev_dependencies: - expect: - path: ../expect - lints: ^2.0.0 - test: ^1.3.4 + expect: any + lints: any + test: any diff --git a/pkg/js_runtime/pubspec.yaml b/pkg/js_runtime/pubspec.yaml index e707d77dfda..14f07a4c891 100644 --- a/pkg/js_runtime/pubspec.yaml +++ b/pkg/js_runtime/pubspec.yaml @@ -6,7 +6,5 @@ environment: sdk: '>=2.12.0 <3.0.0' dev_dependencies: - expect: - path: ../expect - _fe_analyzer_shared: - path: ../_fe_analyzer_shared + expect: any + _fe_analyzer_shared: any diff --git a/pkg/kernel/pubspec.yaml b/pkg/kernel/pubspec.yaml index 140b0ee20ff..31ec688ed1b 100644 --- a/pkg/kernel/pubspec.yaml +++ b/pkg/kernel/pubspec.yaml @@ -9,9 +9,7 @@ environment: sdk: '>=2.12.0 <3.0.0' dev_dependencies: - args: ^2.0.0 - expect: - path: ../expect - front_end: - path: ../front_end + args: any + expect: any + front_end: any test: any diff --git a/pkg/modular_test/pubspec.yaml b/pkg/modular_test/pubspec.yaml index d6fcca82ea3..538c555ee90 100644 --- a/pkg/modular_test/pubspec.yaml +++ b/pkg/modular_test/pubspec.yaml @@ -5,6 +5,7 @@ description: > Small framework to test modular pipelines. This is used within the Dart SDK to define and validate modular tests, and to execute them using the modular pipeline of different SDK tools. + environment: sdk: '>=2.16.0 <3.0.0' @@ -14,8 +15,6 @@ dependencies: yaml: any dev_dependencies: - async_helper: - path: ../async_helper - expect: - path: ../expect + async_helper: any + expect: any test: any diff --git a/pkg/nnbd_migration/pubspec.yaml b/pkg/nnbd_migration/pubspec.yaml index e89625b9caa..67f287b3fbc 100644 --- a/pkg/nnbd_migration/pubspec.yaml +++ b/pkg/nnbd_migration/pubspec.yaml @@ -10,30 +10,19 @@ dependencies: _fe_analyzer_shared: any analyzer: any analyzer_plugin: any - args: ^2.3.0 - cli_util: ^0.3.5 - collection: ^1.15.0 - crypto: ^3.0.1 + args: any + cli_util: any + collection: any + crypto: any meta: any - path: ^1.6.2 - pub_semver: ^2.1.0 - source_span: ^1.4.1 + path: any + pub_semver: any + source_span: any yaml: any dev_dependencies: - analyzer_utilities: - path: ../analyzer_utilities - http: ^0.13.4 + analyzer_utilities: any + http: any lints: any - test: ^1.6.4 - test_reflective_loader: ^0.2.0 - -dependency_overrides: - _fe_analyzer_shared: - path: ../_fe_analyzer_shared - analyzer: - path: ../analyzer - analyzer_plugin: - path: ../analyzer_plugin - meta: - path: ../meta + test: any + test_reflective_loader: any diff --git a/pkg/scrape/pubspec.yaml b/pkg/scrape/pubspec.yaml index d540ce10f86..ca3cee51b37 100644 --- a/pkg/scrape/pubspec.yaml +++ b/pkg/scrape/pubspec.yaml @@ -7,10 +7,9 @@ environment: sdk: ^2.13.0 dependencies: - args: ^2.1.1 - analyzer: - path: ../analyzer - path: ^1.7.0 + args: any + analyzer: any + path: any dev_dependencies: lints: any diff --git a/pkg/smith/pubspec.yaml b/pkg/smith/pubspec.yaml index de47131c6f2..4dfeaea63e5 100644 --- a/pkg/smith/pubspec.yaml +++ b/pkg/smith/pubspec.yaml @@ -5,5 +5,4 @@ publish_to: none environment: sdk: "^2.12.0" dev_dependencies: - expect: - path: ../expect + expect: any diff --git a/pkg/sourcemap_testing/pubspec.yaml b/pkg/sourcemap_testing/pubspec.yaml index 5732caf3d74..95dada80862 100644 --- a/pkg/sourcemap_testing/pubspec.yaml +++ b/pkg/sourcemap_testing/pubspec.yaml @@ -7,12 +7,9 @@ environment: sdk: '>=2.1.0 <3.0.0' dependencies: - _fe_analyzer_shared: - path: ../_fe_analyzer_shared - dart2js_tools: - path: ../dart2js_tools - expect: - path: ../expect + _fe_analyzer_shared: any + dart2js_tools: any + expect: any path: any source_maps: any source_span: any diff --git a/pkg/status_file/pubspec.yaml b/pkg/status_file/pubspec.yaml index 5f9e8e26068..27e76b29234 100644 --- a/pkg/status_file/pubspec.yaml +++ b/pkg/status_file/pubspec.yaml @@ -1,12 +1,13 @@ name: status_file # This package is not intended for consumption on pub.dev. DO NOT publish. publish_to: none + environment: sdk: "^2.12.0" + dependencies: - path: "^1.4.0" - args: ^2.0.0 + path: any + args: any dev_dependencies: - expect: - path: ../expect + expect: any diff --git a/pkg/telemetry/pubspec.yaml b/pkg/telemetry/pubspec.yaml index 2ceeac06e69..12acecc4e43 100644 --- a/pkg/telemetry/pubspec.yaml +++ b/pkg/telemetry/pubspec.yaml @@ -7,12 +7,11 @@ environment: sdk: '>=2.12.0 <3.0.0' dependencies: - http: ^0.13.0 - meta: - path: ../meta - path: ^1.4.0 - stack_trace: ^1.7.0 - usage: ^4.0.0 + http: any + meta: any + path: any + stack_trace: any + usage: any dev_dependencies: - test: ^1.0.0 + test: any diff --git a/pkg/test_runner/pubspec.yaml b/pkg/test_runner/pubspec.yaml index e78bc0836ec..f831b6bb30a 100644 --- a/pkg/test_runner/pubspec.yaml +++ b/pkg/test_runner/pubspec.yaml @@ -9,33 +9,16 @@ environment: sdk: "^2.3.0" dependencies: args: any - dart2js_tools: - path: ../dart2js_tools - package_config: - path: ../../third_party/pkg_tested/package_config + dart2js_tools: any + package_config: any path: any pool: any - smith: - path: ../smith - status_file: - path: ../status_file - webdriver: - path: ../../third_party/pkg/webdriver + smith: any + status_file: any + webdriver: any + dev_dependencies: - analyzer: - path: ../../pkg/analyzer - expect: - path: ../expect + analyzer: any + expect: any file: any glob: any -dependency_overrides: - # Other packages in the dependency graph have normal hosted dependencies on - # this, so just override it to force the local one. - analyzer: - path: ../../pkg/analyzer - args: - path: ../../third_party/pkg/args - file: - path: ../../third_party/pkg/file/packages/file - glob: - path: ../../third_party/pkg/glob diff --git a/pkg/vm/pubspec.yaml b/pkg/vm/pubspec.yaml index 4086172060c..ca8bf359336 100644 --- a/pkg/vm/pubspec.yaml +++ b/pkg/vm/pubspec.yaml @@ -7,20 +7,16 @@ environment: sdk: '>=2.15.0 <3.0.0' dependencies: - args: ^2.0.0 - build_integration: - path: ../build_integration + args: any + build_integration: any + collection: any crypto: any - front_end: - path: ../front_end - kernel: - path: ../kernel + front_end: any + kernel: any package_config: any - collection: ^1.15.0 dev_dependencies: - expect: - path: ../expect + expect: any json_rpc_2: any path: any test: any diff --git a/runtime/tools/wiki/xref_extractor/pubspec.yaml b/runtime/tools/wiki/xref_extractor/pubspec.yaml index ec9652d1bff..11fd5ef8c71 100644 --- a/runtime/tools/wiki/xref_extractor/pubspec.yaml +++ b/runtime/tools/wiki/xref_extractor/pubspec.yaml @@ -7,7 +7,7 @@ environment: sdk: '>=2.7.0 <3.0.0' dependencies: - path: ^1.6.0 + path: any dev_dependencies: lints: any diff --git a/tools/package_deps/bin/package_deps.dart b/tools/package_deps/bin/package_deps.dart index 8814aa7c487..48bf5b01e9c 100644 --- a/tools/package_deps/bin/package_deps.dart +++ b/tools/package_deps/bin/package_deps.dart @@ -327,18 +327,10 @@ class Package implements Comparable { // for pkg/ packages. if (!publishable) { for (PubDep dep in [..._declaredPubDeps, ..._declaredDevPubDeps]) { - if (pkgPackages.contains(dep.name) && dep is! PathPubDep) { - // check to see if there is a dependency_override to a path dependency - final override = _declaredOverridePubDeps - .singleWhereOrNull((element) => element.name == dep.name); - if (override != null && override is PathPubDep) { - continue; - } - - out(' Prefer a relative path dep for pkg/ packages:'); - out(' $dep'); - fail = true; - } + if (dep is AnyPubDep) continue; + out(' Prefer `any` dependencies for unpublished packages'); + out(' $dep'); + fail = true; } } @@ -530,7 +522,7 @@ abstract class PubDep { static PubDep parse(String name, Object dep) { if (dep is String) { - return SemverPubDep(name, dep); + return (dep == 'any') ? AnyPubDep(name) : SemverPubDep(name, dep); } else if (dep is Map) { if (dep.containsKey('path')) { return PathPubDep(name, dep['path']); @@ -543,6 +535,13 @@ abstract class PubDep { } } +class AnyPubDep extends PubDep { + AnyPubDep(String name) : super(name); + + @override + String toString() => '$name: any'; +} + class SemverPubDep extends PubDep { final String value;