diff --git a/pkg/_fe_analyzer_shared/pubspec.yaml b/pkg/_fe_analyzer_shared/pubspec.yaml index 5f4c879e9ab..ad5468c3f7f 100644 --- a/pkg/_fe_analyzer_shared/pubspec.yaml +++ b/pkg/_fe_analyzer_shared/pubspec.yaml @@ -9,5 +9,9 @@ environment: dependencies: meta: ^1.0.2 +# We use 'any' version constraints here as we get our package versions from +# the dart-lang/sdk repo's DEPS file. Note that this is a special case; the +# best practice for packages is to specify their compatible version ranges. +# See also https://dart.dev/tools/pub/dependencies. dev_dependencies: - test: ^1.3.4 + test: any diff --git a/pkg/_js_interop_checks/pubspec.yaml b/pkg/_js_interop_checks/pubspec.yaml index 776dab8d475..9be1352fc04 100644 --- a/pkg/_js_interop_checks/pubspec.yaml +++ b/pkg/_js_interop_checks/pubspec.yaml @@ -5,6 +5,7 @@ publish_to: none environment: sdk: '>=2.12.0 <3.0.0' +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: _fe_analyzer_shared: any kernel: any diff --git a/pkg/analysis_server/pubspec.yaml b/pkg/analysis_server/pubspec.yaml index 4b7314df27e..93103cbfdb2 100644 --- a/pkg/analysis_server/pubspec.yaml +++ b/pkg/analysis_server/pubspec.yaml @@ -5,6 +5,7 @@ publish_to: none environment: sdk: '>=2.17.0 <3.0.0' +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: _fe_analyzer_shared: any analyzer: any @@ -25,6 +26,7 @@ dependencies: watcher: any yaml: any +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: analyzer_utilities: any cli_util: any diff --git a/pkg/analysis_server_client/pubspec.yaml b/pkg/analysis_server_client/pubspec.yaml index c243b321f67..a5438e95393 100644 --- a/pkg/analysis_server_client/pubspec.yaml +++ b/pkg/analysis_server_client/pubspec.yaml @@ -13,11 +13,12 @@ dependencies: path: ^1.8.0 pub_semver: ^2.0.0 +# We use 'any' version constraints here as we get our package versions from +# the dart-lang/sdk repo's DEPS file. Note that this is a special case; the +# best practice for packages is to specify their compatible version ranges. +# See also https://dart.dev/tools/pub/dependencies. dev_dependencies: - analyzer: - path: ../analyzer - analysis_server: - path: ../analysis_server - analyzer_utilities: - path: ../analyzer_utilities - test: ^1.14.2 + analyzer: any + analysis_server: any + analyzer_utilities: any + test: any diff --git a/pkg/analyzer/pubspec.yaml b/pkg/analyzer/pubspec.yaml index 25c8cda7382..77c258e1cb5 100644 --- a/pkg/analyzer/pubspec.yaml +++ b/pkg/analyzer/pubspec.yaml @@ -20,13 +20,16 @@ dependencies: watcher: ^1.0.0 yaml: ^3.0.0 +# We use 'any' version constraints here as we get our package versions from +# the dart-lang/sdk repo's DEPS file. Note that this is a special case; the +# best practice for packages is to specify their compatible version ranges. +# See also https://dart.dev/tools/pub/dependencies. dev_dependencies: - analyzer_utilities: - path: ../analyzer_utilities - args: ^2.0.0 - async: ^2.5.0 - linter: ^1.12.0 - lints: ^2.0.0 - matcher: ^0.12.10 - test: ^1.16.0 - test_reflective_loader: ^0.2.0 + analyzer_utilities: any + args: any + async: any + linter: any + lints: any + matcher: any + test: any + test_reflective_loader: any diff --git a/pkg/analyzer_cli/pubspec.yaml b/pkg/analyzer_cli/pubspec.yaml index 60071144854..2eb61ca6164 100644 --- a/pkg/analyzer_cli/pubspec.yaml +++ b/pkg/analyzer_cli/pubspec.yaml @@ -7,6 +7,7 @@ publish_to: none environment: sdk: "^2.14.0" +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: analyzer: any args: any @@ -16,6 +17,7 @@ dependencies: pub_semver: any yaml: any +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: lints: any test_reflective_loader: any diff --git a/pkg/analyzer_plugin/pubspec.yaml b/pkg/analyzer_plugin/pubspec.yaml index 946fd7e5dcd..0115b6f70cb 100644 --- a/pkg/analyzer_plugin/pubspec.yaml +++ b/pkg/analyzer_plugin/pubspec.yaml @@ -13,10 +13,13 @@ dependencies: pub_semver: ^2.0.0 yaml: ^3.1.0 +# We use 'any' version constraints here as we get our package versions from +# the dart-lang/sdk repo's DEPS file. Note that this is a special case; the +# best practice for packages is to specify their compatible version ranges. +# See also https://dart.dev/tools/pub/dependencies. dev_dependencies: - analyzer_utilities: - path: ../analyzer_utilities - html: ^0.15.0 - path: ^1.8.0 - test_reflective_loader: ^0.2.0 - test: ^1.16.6 + analyzer_utilities: any + html: any + path: any + test_reflective_loader: any + test: any diff --git a/pkg/analyzer_utilities/pubspec.yaml b/pkg/analyzer_utilities/pubspec.yaml index e974be1e1ad..a7c634cb4a0 100644 --- a/pkg/analyzer_utilities/pubspec.yaml +++ b/pkg/analyzer_utilities/pubspec.yaml @@ -5,6 +5,7 @@ publish_to: none environment: sdk: '>=2.12.0 <3.0.0' +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: analyzer: any html: any @@ -12,5 +13,6 @@ dependencies: path: any test: any +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: lints: any diff --git a/pkg/async_helper/pubspec.yaml b/pkg/async_helper/pubspec.yaml index 55bc80d807c..dc909f97a66 100644 --- a/pkg/async_helper/pubspec.yaml +++ b/pkg/async_helper/pubspec.yaml @@ -3,14 +3,14 @@ name: async_helper publish_to: none description: >- - Async_helper is used for asynchronous tests that do not want to - make use of the Dart unittest library - for example, the core - language tests. - Third parties are discouraged from using this, and should use - the facilities provided in package:test. + Async_helper is used for asynchronous tests that do not want to make use of + the Dart unittest library - for example, the core language tests. Third + parties are discouraged from using this, and should use the facilities + provided in package:test. environment: sdk: '>=2.12.0 <3.0.0' +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: expect: any diff --git a/pkg/build_integration/pubspec.yaml b/pkg/build_integration/pubspec.yaml index 2286f3e6ced..fbb87154538 100644 --- a/pkg/build_integration/pubspec.yaml +++ b/pkg/build_integration/pubspec.yaml @@ -8,8 +8,10 @@ publish_to: none environment: sdk: '>=2.12.0 <3.0.0' +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: front_end: any +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: test: any diff --git a/pkg/compiler/pubspec.yaml b/pkg/compiler/pubspec.yaml index 071e5e1f391..ff1ae628d87 100644 --- a/pkg/compiler/pubspec.yaml +++ b/pkg/compiler/pubspec.yaml @@ -6,8 +6,7 @@ publish_to: none environment: sdk: '>=2.16.0 <3.0.0' -# NOTE: `pub get / pub upgrade` are generally not needed when working on this -# package. The `.packages` file in the repository root will be used by default. +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: _fe_analyzer_shared: any _js_interop_checks: any @@ -21,6 +20,7 @@ dependencies: kernel: any vm_service: any +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: args: any dart_style: any diff --git a/pkg/dart2js_info/pubspec.yaml b/pkg/dart2js_info/pubspec.yaml index 838c754c594..04e3c7b4174 100644 --- a/pkg/dart2js_info/pubspec.yaml +++ b/pkg/dart2js_info/pubspec.yaml @@ -8,6 +8,7 @@ description: >- environment: sdk: '>=2.16.0 <3.0.0' +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: args: any collection: any @@ -17,6 +18,7 @@ dependencies: shelf: any yaml: any +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: lints: any test: any diff --git a/pkg/dart2js_runtime_metrics/pubspec.yaml b/pkg/dart2js_runtime_metrics/pubspec.yaml index 8db98914bf6..57a2179dd44 100644 --- a/pkg/dart2js_runtime_metrics/pubspec.yaml +++ b/pkg/dart2js_runtime_metrics/pubspec.yaml @@ -11,5 +11,6 @@ environment: # a later version of the SDK without it being a breaking change. sdk: ">=2.14.0 <2.15.0" +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: expect: any diff --git a/pkg/dart2js_tools/pubspec.yaml b/pkg/dart2js_tools/pubspec.yaml index ec4d63ba13e..ce67a9bd7aa 100644 --- a/pkg/dart2js_tools/pubspec.yaml +++ b/pkg/dart2js_tools/pubspec.yaml @@ -8,6 +8,7 @@ description: > environment: sdk: '>=2.12.0 <3.0.0' +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: path: any source_maps: any diff --git a/pkg/dart2native/pubspec.yaml b/pkg/dart2native/pubspec.yaml index 6cd68142547..80bf3ee26c9 100644 --- a/pkg/dart2native/pubspec.yaml +++ b/pkg/dart2native/pubspec.yaml @@ -9,8 +9,10 @@ environment: executables: dart2native: +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: path: any +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: lints: any diff --git a/pkg/dart2wasm/pubspec.yaml b/pkg/dart2wasm/pubspec.yaml index 2c0f7117f0c..f4ed37e566c 100644 --- a/pkg/dart2wasm/pubspec.yaml +++ b/pkg/dart2wasm/pubspec.yaml @@ -4,6 +4,7 @@ publish_to: none environment: sdk: '>=2.12.0' +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: _js_interop_checks: any front_end: any diff --git a/pkg/dartdev/pubspec.yaml b/pkg/dartdev/pubspec.yaml index 2e719980a30..58afb2a89bb 100644 --- a/pkg/dartdev/pubspec.yaml +++ b/pkg/dartdev/pubspec.yaml @@ -6,6 +6,7 @@ publish_to: none environment: sdk: '>=2.12.0 <3.0.0' +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: analysis_server: any analysis_server_client: any @@ -25,6 +26,7 @@ dependencies: telemetry: any usage: any +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: expect: any lints: any diff --git a/pkg/dds/pubspec.yaml b/pkg/dds/pubspec.yaml index e2ca11c77ae..40e84532e0a 100644 --- a/pkg/dds/pubspec.yaml +++ b/pkg/dds/pubspec.yaml @@ -19,18 +19,22 @@ dependencies: json_rpc_2: ^3.0.0 meta: ^1.1.8 path: ^1.8.0 - shelf: ^1.0.0 shelf_proxy: ^1.0.0 shelf_static: ^1.0.0 shelf_web_socket: ^1.0.0 - stack_trace: ^1.10.0 + shelf: ^1.0.0 sse: ^4.0.0 + stack_trace: ^1.10.0 stream_channel: ^2.0.0 vm_service: ^8.1.0 web_socket_channel: ^2.0.0 +# We use 'any' version constraints here as we get our package versions from +# the dart-lang/sdk repo's DEPS file. Note that this is a special case; the +# best practice for packages is to specify their compatible version ranges. +# See also https://dart.dev/tools/pub/dependencies. dev_dependencies: - http: ^0.13.0 + http: any lints: any - test: ^1.0.0 - webdriver: ^3.0.0 + test: any + webdriver: any diff --git a/pkg/dds_service_extensions/pubspec.yaml b/pkg/dds_service_extensions/pubspec.yaml index f26c41ba4da..f42ed22b9eb 100644 --- a/pkg/dds_service_extensions/pubspec.yaml +++ b/pkg/dds_service_extensions/pubspec.yaml @@ -12,5 +12,9 @@ dependencies: async: ^2.4.1 vm_service: ^8.1.0 +# We use 'any' version constraints here as we get our package versions from +# the dart-lang/sdk repo's DEPS file. Note that this is a special case; the +# best practice for packages is to specify their compatible version ranges. +# See also https://dart.dev/tools/pub/dependencies. dev_dependencies: lints: any diff --git a/pkg/dev_compiler/pubspec.yaml b/pkg/dev_compiler/pubspec.yaml index f666b47bd2b..1acbb517041 100644 --- a/pkg/dev_compiler/pubspec.yaml +++ b/pkg/dev_compiler/pubspec.yaml @@ -5,6 +5,7 @@ publish_to: none environment: sdk: '>=2.15.0 <3.0.0' +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: _fe_analyzer_shared: any _js_interop_checks: any @@ -21,6 +22,7 @@ dependencies: source_maps: any source_span: any +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: browser_launcher: any expect: any diff --git a/pkg/expect/pubspec.yaml b/pkg/expect/pubspec.yaml index e231d0c33dc..5f045c27d87 100644 --- a/pkg/expect/pubspec.yaml +++ b/pkg/expect/pubspec.yaml @@ -11,6 +11,7 @@ description: >- environment: sdk: '>=2.12.0 <3.0.0' +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: meta: any smith: any diff --git a/pkg/front_end/pubspec.yaml b/pkg/front_end/pubspec.yaml index 780e0c6f7b0..aedd3beb589 100644 --- a/pkg/front_end/pubspec.yaml +++ b/pkg/front_end/pubspec.yaml @@ -8,27 +8,29 @@ publish_to: none environment: sdk: '>=2.13.0 <3.0.0' +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: _fe_analyzer_shared: any kernel: any package_config: any +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: analyzer: any args: any async_helper: any build_integration: any compiler: any - dart2wasm: any dart_style: any + dart2wasm: any dev_compiler: any expect: any json_rpc_2: any path: any - test: any test_reflective_loader: any + test: any testing: any - vm: any vm_service: any + vm: any web_socket_channel: any yaml: any diff --git a/pkg/frontend_server/pubspec.yaml b/pkg/frontend_server/pubspec.yaml index 9ce30114faf..93b37404ca7 100644 --- a/pkg/frontend_server/pubspec.yaml +++ b/pkg/frontend_server/pubspec.yaml @@ -6,6 +6,7 @@ publish_to: none environment: sdk: "^2.15.0" +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: _fe_analyzer_shared: any args: any @@ -19,6 +20,7 @@ dependencies: usage: any vm: any +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: mockito: any test: any diff --git a/pkg/js/pubspec.yaml b/pkg/js/pubspec.yaml index c8d12d38033..25acfbaa5bf 100644 --- a/pkg/js/pubspec.yaml +++ b/pkg/js/pubspec.yaml @@ -9,5 +9,9 @@ environment: dependencies: meta: ^1.7.0 +# We use 'any' version constraints here as we get our package versions from +# the dart-lang/sdk repo's DEPS file. Note that this is a special case; the +# best practice for packages is to specify their compatible version ranges. +# See also https://dart.dev/tools/pub/dependencies. dev_dependencies: lints: any diff --git a/pkg/js_ast/pubspec.yaml b/pkg/js_ast/pubspec.yaml index 7d23ea0d8b5..f630c01834b 100644 --- a/pkg/js_ast/pubspec.yaml +++ b/pkg/js_ast/pubspec.yaml @@ -5,6 +5,7 @@ publish_to: none environment: sdk: '>=2.16.0 <3.0.0' +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: expect: any lints: any diff --git a/pkg/js_runtime/pubspec.yaml b/pkg/js_runtime/pubspec.yaml index 14f07a4c891..a452bc99324 100644 --- a/pkg/js_runtime/pubspec.yaml +++ b/pkg/js_runtime/pubspec.yaml @@ -5,6 +5,7 @@ publish_to: none environment: sdk: '>=2.12.0 <3.0.0' +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: - expect: any _fe_analyzer_shared: any + expect: any diff --git a/pkg/js_shared/pubspec.yaml b/pkg/js_shared/pubspec.yaml index 6424aac62ec..3503f2539b2 100644 --- a/pkg/js_shared/pubspec.yaml +++ b/pkg/js_shared/pubspec.yaml @@ -5,6 +5,7 @@ publish_to: none environment: sdk: '>=2.12.0 <3.0.0' +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: - expect: any _fe_analyzer_shared: any + expect: any diff --git a/pkg/kernel/pubspec.yaml b/pkg/kernel/pubspec.yaml index 31ec688ed1b..2fb1c7d583d 100644 --- a/pkg/kernel/pubspec.yaml +++ b/pkg/kernel/pubspec.yaml @@ -8,6 +8,7 @@ publish_to: none environment: sdk: '>=2.12.0 <3.0.0' +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: args: any expect: any diff --git a/pkg/language_versioning_2.7_test/pubspec.yaml b/pkg/language_versioning_2.7_test/pubspec.yaml index 3245f03cf9f..5ee0691374f 100644 --- a/pkg/language_versioning_2.7_test/pubspec.yaml +++ b/pkg/language_versioning_2.7_test/pubspec.yaml @@ -11,4 +11,3 @@ publish_to: none environment: sdk: '>=2.7.0 <3.0.0' - diff --git a/pkg/modular_test/pubspec.yaml b/pkg/modular_test/pubspec.yaml index 538c555ee90..1a202374c2a 100644 --- a/pkg/modular_test/pubspec.yaml +++ b/pkg/modular_test/pubspec.yaml @@ -2,18 +2,20 @@ name: modular_test # This package is not intended for consumption on pub.dev. DO NOT publish. publish_to: none 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. + 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' +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: args: any package_config: any yaml: any +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: async_helper: any expect: any diff --git a/pkg/native_stack_traces/pubspec.yaml b/pkg/native_stack_traces/pubspec.yaml index 50320e5b6dc..ad5add02519 100644 --- a/pkg/native_stack_traces/pubspec.yaml +++ b/pkg/native_stack_traces/pubspec.yaml @@ -13,5 +13,9 @@ dependencies: args: ^2.0.0 path: ^1.8.0 +# We use 'any' version constraints here as we get our package versions from +# the dart-lang/sdk repo's DEPS file. Note that this is a special case; the +# best practice for packages is to specify their compatible version ranges. +# See also https://dart.dev/tools/pub/dependencies. dev_dependencies: lints: any diff --git a/pkg/nnbd_migration/pubspec.yaml b/pkg/nnbd_migration/pubspec.yaml index 67f287b3fbc..381567bacb4 100644 --- a/pkg/nnbd_migration/pubspec.yaml +++ b/pkg/nnbd_migration/pubspec.yaml @@ -6,10 +6,11 @@ publish_to: none environment: sdk: '>=2.14.0 <3.0.0' +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: _fe_analyzer_shared: any - analyzer: any analyzer_plugin: any + analyzer: any args: any cli_util: any collection: any @@ -20,9 +21,10 @@ dependencies: source_span: any yaml: any +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: analyzer_utilities: any http: any lints: any - test: any test_reflective_loader: any + test: any diff --git a/pkg/scrape/pubspec.yaml b/pkg/scrape/pubspec.yaml index ca3cee51b37..ccfb019b861 100644 --- a/pkg/scrape/pubspec.yaml +++ b/pkg/scrape/pubspec.yaml @@ -6,10 +6,12 @@ publish_to: none environment: sdk: ^2.13.0 +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: - args: any analyzer: any + args: any path: any +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: lints: any diff --git a/pkg/smith/pubspec.yaml b/pkg/smith/pubspec.yaml index 4dfeaea63e5..e92131cde51 100644 --- a/pkg/smith/pubspec.yaml +++ b/pkg/smith/pubspec.yaml @@ -2,7 +2,10 @@ name: smith description: Shared code for working with the Dart SDK's tests and test runner. # This package is not intended for consumption on pub.dev. DO NOT publish. publish_to: none + environment: - sdk: "^2.12.0" + sdk: '^2.12.0' + +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: expect: any diff --git a/pkg/sourcemap_testing/pubspec.yaml b/pkg/sourcemap_testing/pubspec.yaml index fdeb960b1a6..d7392767774 100644 --- a/pkg/sourcemap_testing/pubspec.yaml +++ b/pkg/sourcemap_testing/pubspec.yaml @@ -6,6 +6,7 @@ publish_to: none environment: sdk: '>=2.16.0 <3.0.0' +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: _fe_analyzer_shared: any collection: any @@ -15,5 +16,6 @@ dependencies: source_maps: any source_span: any +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: lints: any diff --git a/pkg/status_file/pubspec.yaml b/pkg/status_file/pubspec.yaml index 27e76b29234..70c564ce5bd 100644 --- a/pkg/status_file/pubspec.yaml +++ b/pkg/status_file/pubspec.yaml @@ -5,9 +5,11 @@ publish_to: none environment: sdk: "^2.12.0" +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: - path: any args: any + path: any +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: expect: any diff --git a/pkg/telemetry/pubspec.yaml b/pkg/telemetry/pubspec.yaml index 12acecc4e43..d1b687c56f5 100644 --- a/pkg/telemetry/pubspec.yaml +++ b/pkg/telemetry/pubspec.yaml @@ -6,6 +6,7 @@ publish_to: none environment: sdk: '>=2.12.0 <3.0.0' +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: http: any meta: any @@ -13,5 +14,6 @@ dependencies: stack_trace: any usage: any +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: test: any diff --git a/pkg/test_runner/pubspec.yaml b/pkg/test_runner/pubspec.yaml index 96fa67d656a..26f868fd45c 100644 --- a/pkg/test_runner/pubspec.yaml +++ b/pkg/test_runner/pubspec.yaml @@ -5,9 +5,11 @@ name: test_runner # This package is not intended for consumption on pub.dev. DO NOT publish. publish_to: none + environment: sdk: "^2.9.0" +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: args: any dart2js_tools: any @@ -18,6 +20,7 @@ dependencies: status_file: any webdriver: any +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: analyzer: any expect: any diff --git a/pkg/vm/pubspec.yaml b/pkg/vm/pubspec.yaml index ca8bf359336..009cfeba4bb 100644 --- a/pkg/vm/pubspec.yaml +++ b/pkg/vm/pubspec.yaml @@ -6,6 +6,7 @@ publish_to: none environment: sdk: '>=2.15.0 <3.0.0' +# Use 'any' constraints here; we get our versions from the DEPS file. dependencies: args: any build_integration: any @@ -15,6 +16,7 @@ dependencies: kernel: any package_config: any +# Use 'any' constraints here; we get our versions from the DEPS file. dev_dependencies: expect: any json_rpc_2: any diff --git a/pkg/vm_service/pubspec.yaml b/pkg/vm_service/pubspec.yaml index 9eda7222fa1..7f9470ef431 100644 --- a/pkg/vm_service/pubspec.yaml +++ b/pkg/vm_service/pubspec.yaml @@ -11,6 +11,10 @@ environment: dependencies: +# We use 'any' version constraints here as we get our package versions from +# the dart-lang/sdk repo's DEPS file. Note that this is a special case; the +# best practice for packages is to specify their compatible version ranges. +# See also https://dart.dev/tools/pub/dependencies. dev_dependencies: async: any expect: any @@ -19,5 +23,5 @@ dev_dependencies: mockito: any path: any pub_semver: any - test: any test_package: any + test: any diff --git a/pkg/vm_snapshot_analysis/pubspec.yaml b/pkg/vm_snapshot_analysis/pubspec.yaml index 10816d4023f..b38740a592f 100644 --- a/pkg/vm_snapshot_analysis/pubspec.yaml +++ b/pkg/vm_snapshot_analysis/pubspec.yaml @@ -14,6 +14,10 @@ dependencies: collection: ^1.15.0 path: ^1.8.0 +# We use 'any' version constraints here as we get our package versions from +# the dart-lang/sdk repo's DEPS file. Note that this is a special case; the +# best practice for packages is to specify their compatible version ranges. +# See also https://dart.dev/tools/pub/dependencies. dev_dependencies: lints: any - test: ^1.16.8 + test: any diff --git a/pkg/wasm_builder/pubspec.yaml b/pkg/wasm_builder/pubspec.yaml index af4d545c3d2..a4286a4040c 100644 --- a/pkg/wasm_builder/pubspec.yaml +++ b/pkg/wasm_builder/pubspec.yaml @@ -5,5 +5,3 @@ description: Generate binary Wasm modules environment: sdk: '>=2.12.0' - -dependencies: diff --git a/tools/package_deps/bin/package_deps.dart b/tools/package_deps/bin/package_deps.dart index 9556a1a0c42..3cf437cd2ac 100644 --- a/tools/package_deps/bin/package_deps.dart +++ b/tools/package_deps/bin/package_deps.dart @@ -251,41 +251,39 @@ class Package implements Comparable { fail = true; } - // Validate that we don't have relative deps into third_party. - // TODO(devoncarew): This is currently just enforced for publishable - // packages. - if (publishable) { - for (PubDep dep in [..._declaredPubDeps, ..._declaredDevPubDeps]) { - if (dep is PathPubDep) { - var path = dep.path; - - if (path.contains('third_party/pkg_tested/') || - path.contains('third_party/pkg/')) { - out(' Prefer a semver dependency for packages brought in via DEPS:'); - out(' $dep'); - fail = true; - } - } - } - } - - // Validate that published packages don't use path deps. if (publishable) { + // Validate that deps for published packages use semver (but not any). for (PubDep dep in _declaredPubDeps) { - if (dep is PathPubDep) { - out(' Published packages should use semver deps:'); - out(' $dep'); - fail = true; - } + if (dep is SemverPubDep) continue; + + out(' Published packages should use semver deps:'); + out(' $dep'); + fail = true; + } + + // Validate that dev deps for published packages use an 'any' constraint. + for (PubDep dep in _declaredDevPubDeps) { + if (dep is AnyPubDep) continue; + + out(' Prefer an `any` constraint for dev dependencies'); + out(' $dep'); + fail = true; + } + } else { + // Validate that non-publishable packages use an 'any' constraint. + for (PubDep dep in [..._declaredPubDeps, ..._declaredDevPubDeps]) { + if (dep is AnyPubDep) continue; + + out(' Prefer an `any` constraint for unpublished packages'); + out(' $dep'); + fail = true; } } // Validate that the version of any package dep'd in works with our declared // version ranges. for (PubDep dep in [..._declaredPubDeps, ..._declaredDevPubDeps]) { - if (dep is! SemverPubDep) { - continue; - } + if (dep is! SemverPubDep) continue; ResolvedDep? resolvedDep = sdkDeps.resolve(dep.name); if (resolvedDep == null) { @@ -322,17 +320,6 @@ class Package implements Comparable { } } - // Validate that non-published packages use relative a (relative) path dep - // for pkg/ packages. - if (!publishable) { - for (PubDep dep in [..._declaredPubDeps, ..._declaredDevPubDeps]) { - if (dep is AnyPubDep) continue; - out(' Prefer `any` dependencies for unpublished packages'); - out(' $dep'); - fail = true; - } - } - if (!fail) { print(' No issues.'); } diff --git a/tools/verify_docs/README.md b/tools/verify_docs/README.md index 41be8635eea..f2adb28e39e 100644 --- a/tools/verify_docs/README.md +++ b/tools/verify_docs/README.md @@ -123,4 +123,3 @@ For example: // final BuildContext context; // final String userAvatarUrl; ``` -