From 0aa01cf395dc3fb319e6c1f7a2be0bed37b884ad Mon Sep 17 00:00:00 2001 From: Ivan Inozemtsev Date: Wed, 25 Jun 2025 08:00:10 -0700 Subject: [PATCH] Add pubspecs to Dart tests and scripts executed by checked in SDK Without their own pubspecs, they belong to `_` project from the root `pubspec.yaml`. As a result, once we bump the SDK version, these scripts cannot be executed with the checked in sdk. Note: when we bump the SDK version we also must bump the version in the root pubspec, otherwise unreleased language experiments break. Change-Id: Ie2ec35865a5966d6801de832a4b6ad312a24d277 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436901 Reviewed-by: Johnni Winther Reviewed-by: Martin Kustermann Commit-Queue: Ivan Inozemtsev --- pubspec.yaml | 3 +++ runtime/tests/vm/dart/pubspec.yaml | 8 ++++++++ tests/ffi/pubspec.yaml | 8 ++++++++ tools/generate_package_config.dart | 2 ++ utils/pubspec.yaml | 8 ++++++++ 5 files changed, 29 insertions(+) create mode 100644 runtime/tests/vm/dart/pubspec.yaml create mode 100644 tests/ffi/pubspec.yaml create mode 100644 utils/pubspec.yaml diff --git a/pubspec.yaml b/pubspec.yaml index 7191316234d..120d380a540 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -76,9 +76,11 @@ workspace: - pkg/vm_service_protos - pkg/vm_snapshot_analysis - pkg/wasm_builder + - runtime/tests/vm/dart - runtime/tools/profiling - samples/ffi/http - samples/ffi/httpIG + - tests/ffi # dap and language_server_protocol are checked in to and # developed in the SDK repo, though they are located in `third_party/`. - third_party/pkg/dap @@ -86,6 +88,7 @@ workspace: - tools/package_deps - tools/verify_docs - tools + - utils # All third_party packages are retrieved via the DEPS-file and overridden here. dependency_overrides: diff --git a/runtime/tests/vm/dart/pubspec.yaml b/runtime/tests/vm/dart/pubspec.yaml new file mode 100644 index 00000000000..6ee01f1204f --- /dev/null +++ b/runtime/tests/vm/dart/pubspec.yaml @@ -0,0 +1,8 @@ +name: runtime_tests_vm_dart +description: VM Dart tests + +environment: + sdk: ^3.8.0 + +resolution: workspace +publish_to: none diff --git a/tests/ffi/pubspec.yaml b/tests/ffi/pubspec.yaml new file mode 100644 index 00000000000..abdbd1242e9 --- /dev/null +++ b/tests/ffi/pubspec.yaml @@ -0,0 +1,8 @@ +name: tests_ffi +description: FFI tests + +environment: + sdk: ^3.8.0 + +resolution: workspace +publish_to: none diff --git a/tools/generate_package_config.dart b/tools/generate_package_config.dart index d24470e6824..1640887435c 100644 --- a/tools/generate_package_config.dart +++ b/tools/generate_package_config.dart @@ -82,9 +82,11 @@ $overrides rootUri.startsWith('../pkg/') || // SDK package rootUri.startsWith('../samples/') || // sample package rootUri.startsWith('../runtime/') || // VM package + rootUri.startsWith('../tests/ffi') || // FFI tests rootUri.startsWith( '../tools', ) || // A tool package for developing the SDK. + rootUri.startsWith('../utils' ) || // Utils for building the SDK. rootUri == '../' // The main workspace package )) { print('Package ${package['name']} is imported from outside the SDK.'); diff --git a/utils/pubspec.yaml b/utils/pubspec.yaml new file mode 100644 index 00000000000..881fb15c313 --- /dev/null +++ b/utils/pubspec.yaml @@ -0,0 +1,8 @@ +name: utils +description: Internal utils for building Dart SDK. + +environment: + sdk: ^3.8.0 + +resolution: workspace +publish_to: none