Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit bb2ff8b

Browse files
authored
Move testing/litetest to pub workspaces. (#54082)
More incremental version of #53997.
1 parent 48583fb commit bb2ff8b

File tree

4 files changed

+13
-24
lines changed

4 files changed

+13
-24
lines changed

pubspec.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ environment:
8080

8181
# Declare all packages that are part of the workspace.
8282
workspace:
83+
- testing/litetest
8384
- tools/engine_tool
8485

8586
# Declare all dependencies that are used by one or more packages.
@@ -145,8 +146,6 @@ dependency_overrides:
145146
path: ./third_party/dart/pkg/expect
146147
file:
147148
path: ./third_party/dart/third_party/pkg/file/packages/file
148-
litetest:
149-
path: ./testing/litetest
150149
logging:
151150
path: ./third_party/dart/third_party/pkg/logging
152151
meta:

shell/platform/fuchsia/dart-pkg/zircon/BUILD.gn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ dart_library("zircon_lib") {
6161
dart_library("zircon_tests_lib") {
6262
testonly = true
6363
package_name = "zircon_tests"
64-
language_version = "2.12"
6564
source_dir = "."
6665
package_root = "test"
6766

testing/litetest/pubspec.yaml

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,15 @@
55
name: litetest
66
publish_to: none
77

8-
# Do not add any dependencies that require more than what is provided in
9-
# //third_party/dart/pkg or //third_party/dart/third_party/pkg.
10-
# In particular, package:test is not usable here.
11-
12-
# If you do add packages here, make sure you can run `pub get --offline`, and
13-
# check the .packages and .package_config to make sure all the paths are
14-
# relative to this directory into //third_party/dart
15-
8+
# Required for workspace support.
169
environment:
17-
sdk: '>=3.2.0-0 <4.0.0'
10+
sdk: ^3.5.0-294.0.dev
11+
12+
# This package is managed as part of the engine workspace.
13+
resolution: workspace
1814

1915
dependencies:
2016
async_helper: any
2117
expect: any
2218
meta: any
2319
smith: any
24-
25-
dependency_overrides:
26-
async_helper:
27-
path: ../../third_party/dart/pkg/async_helper
28-
expect:
29-
path: ../../third_party/dart/pkg/expect
30-
meta:
31-
path: ../../third_party/dart/pkg/meta
32-
smith:
33-
path: ../../third_party/dart/pkg/smith

tools/fuchsia/dart/gen_dart_package_config.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,15 @@ def language_version_from_pubspec(pubspec):
4949
if not parsed:
5050
return DEFAULT_LANGUAGE_VERSION
5151

52-
# If a format like sdk: '>=a.b' or sdk: 'a.b' is found, we'll use a.b.
52+
# If any format like:
53+
# sdk: '>=a.b'
54+
# sdk: '^a.b'
55+
# sdk: 'a.b'
56+
# ... is found, we 'a.b' as the language version.
57+
#
5358
# In all other cases we default to "2.8"
5459
env_sdk = parsed.get('environment', {}).get('sdk', 'any')
55-
match = re.search(r'^(>=)?((0|[1-9]\d*)\.(0|[1-9]\d*))', env_sdk)
60+
match = re.search(r'^(>=|\^)?((0|[1-9]\d*)\.(0|[1-9]\d*))', env_sdk)
5661
if match:
5762
min_sdk_version = match.group(2)
5863
else:

0 commit comments

Comments
 (0)