Skip to content

Commit b9b7705

Browse files
sigurdmCommit Queue
authored andcommitted
Migrate to use pub workspace
Use `pub get` to generate `.dart_tool/package_config.json` on gclient sync. All pkg/ (and a few third_party) packages that are developed inside the sdk repo are included in the workspace from the root `pubspec.yaml`. All dependencies that are pulled in via DEPS are added as path dependencies via `dependency_overrides` in the root `pubspec.yaml`. Bug: #56220 Change-Id: I38c12b608c68da54c57821116cf9aa6696936746 Tested: relies on CQ of existing tests. Should have no effect on functionality CoreLibraryReviewExempt: only core library change is adding a `// ignore:` comment. Should have no influence on functionality Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397164 Commit-Queue: Sigurd Meldgaard <[email protected]> Reviewed-by: Alexander Thomas <[email protected]>
1 parent 424cf1b commit b9b7705

File tree

73 files changed

+539
-819
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+539
-819
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ pubspec.lock
8282
/.dart_tool/native_assets_builder/
8383

8484
# Files generated by pub and other dart tools.
85-
/.dart_tool/
85+
.dart_tool/
8686

8787
# Generated by tools/generate_package_config.dart to include extra packages in
8888
# the project.

pkg/_fe_analyzer_shared/pubspec.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ repository: https://github.com/dart-lang/sdk/tree/main/pkg/_fe_analyzer_shared
66
environment:
77
sdk: ^3.5.0
88

9+
resolution: workspace
910

1011
dependencies:
1112
meta: ^1.9.0
@@ -19,8 +20,3 @@ dev_dependencies:
1920
collection: any
2021
test: any
2122

22-
dependency_overrides:
23-
test:
24-
path: ../../third_party/pkg/test/pkgs/test/
25-
analyzer:
26-
path: ../analyzer

pkg/_js_interop_checks/pubspec.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ environment:
66
# Use min prerelease bound to get the latest formatter changes.
77
sdk: '^3.7.0'
88

9+
resolution: workspace
10+
911
# Use 'any' constraints here; we get our versions from the DEPS file.
1012
dependencies:
1113
_fe_analyzer_shared: any

pkg/_macros/pubspec.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ publish_to: none
88
repository: https://github.com/dart-lang/sdk/tree/main/pkg/_macros
99

1010
environment:
11-
sdk: ^3.4.0-256.0.dev
11+
sdk: ^3.5.0
12+
13+
resolution: workspace
1214

1315
# Note that as an SDK vendored package, pub package dependencies are only
1416
# allowed in the dev_dependencies section.

pkg/analysis_server/pubspec.yaml

Lines changed: 2 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ publish_to: none
55
environment:
66
sdk: '^3.7.0'
77

8+
resolution: workspace
9+
810
# Use 'any' constraints here; we get our versions from the DEPS file.
911
dependencies:
1012
_fe_analyzer_shared: any
@@ -44,127 +46,3 @@ dev_dependencies:
4446
test_descriptor: any
4547
test_reflective_loader: any
4648
web_socket_channel: any
47-
48-
dependency_overrides:
49-
_fe_analyzer_shared:
50-
path: ../_fe_analyzer_shared
51-
analysis_server_plugin:
52-
path: ../analysis_server_plugin
53-
analyzer:
54-
path: ../analyzer
55-
analyzer_plugin:
56-
path: ../analyzer_plugin
57-
analyzer_utilities:
58-
path: ../analyzer_utilities
59-
args:
60-
path: ../../third_party/pkg/args
61-
async:
62-
path: ../../third_party/pkg/async
63-
boolean_selector:
64-
path: ../../third_party/pkg/boolean_selector
65-
cli_util:
66-
path: ../../third_party/pkg/cli_util
67-
clock:
68-
path: ../../third_party/pkg/clock
69-
collection:
70-
path: ../../third_party/pkg/collection
71-
convert:
72-
path: ../../third_party/pkg/convert
73-
crypto:
74-
path: ../../third_party/pkg/crypto
75-
dart_style:
76-
path: ../../third_party/pkg/dart_style
77-
dtd:
78-
path: ../dtd
79-
file:
80-
path: ../../third_party/pkg/file/packages/file
81-
frontend_server_client:
82-
path: ../../third_party/pkg/webdev/frontend_server_client
83-
glob:
84-
path: ../../third_party/pkg/glob
85-
http:
86-
path: ../../third_party/pkg/http/pkgs/http
87-
http_multi_server:
88-
path: ../../third_party/pkg/http_multi_server
89-
http_parser:
90-
path: ../../third_party/pkg/http_parser
91-
intl:
92-
path: ../../third_party/pkg/intl
93-
json_rpc_2:
94-
path: ../../third_party/pkg/json_rpc_2
95-
js:
96-
path: ../js
97-
language_server_protocol:
98-
path: ../../third_party/pkg/language_server_protocol
99-
linter:
100-
path: ../linter
101-
lints:
102-
path: ../../third_party/pkg/lints
103-
logging:
104-
path: ../../third_party/pkg/logging
105-
matcher:
106-
path: ../../third_party/pkg/matcher
107-
memory_usage:
108-
path: ../../third_party/pkg/leak_tracker/pkgs/memory_usage
109-
meta:
110-
path: ../meta
111-
mime:
112-
path: ../../third_party/pkg/tools/pkgs/mime
113-
package_config:
114-
path: ../../third_party/pkg/package_config
115-
path:
116-
path: ../../third_party/pkg/path
117-
pool:
118-
path: ../../third_party/pkg/pool
119-
pub_semver:
120-
path: ../../third_party/pkg/pub_semver
121-
shelf:
122-
path: ../../third_party/pkg/shelf/pkgs/shelf
123-
shelf_packages_handler:
124-
path: ../../third_party/pkg/shelf/pkgs/shelf_packages_handler
125-
shelf_static:
126-
path: ../../third_party/pkg/shelf/pkgs/shelf_static
127-
shelf_web_socket:
128-
path: ../../third_party/pkg/shelf/pkgs/shelf_web_socket
129-
source_map_stack_trace:
130-
path: ../../third_party/pkg/tools/pkgs/source_map_stack_trace
131-
source_maps:
132-
path: ../../third_party/pkg/source_maps
133-
source_span:
134-
path: ../../third_party/pkg/source_span
135-
stack_trace:
136-
path: ../../third_party/pkg/stack_trace
137-
stream_channel:
138-
path: ../../third_party/pkg/stream_channel
139-
string_scanner:
140-
path: ../../third_party/pkg/string_scanner
141-
telemetry:
142-
path: ../telemetry
143-
term_glyph:
144-
path: ../../third_party/pkg/term_glyph
145-
test:
146-
path: ../../third_party/pkg/test/pkgs/test
147-
test_api:
148-
path: ../../third_party/pkg/test/pkgs/test_api
149-
test_core:
150-
path: ../../third_party/pkg/test/pkgs/test_core
151-
test_descriptor:
152-
path: ../../third_party/pkg/test_descriptor
153-
test_reflective_loader:
154-
path: ../../third_party/pkg/test_reflective_loader
155-
typed_data:
156-
path: ../../third_party/pkg/typed_data
157-
unified_analytics:
158-
path: ../../third_party/pkg/tools/pkgs/unified_analytics
159-
vm_service:
160-
path: ../vm_service
161-
watcher:
162-
path: ../../third_party/pkg/watcher
163-
web_socket_channel:
164-
path: ../../third_party/pkg/web_socket_channel
165-
webkit_inspection_protocol:
166-
path: ../../third_party/pkg/webkit_inspection_protocol
167-
yaml:
168-
path: ../../third_party/pkg/yaml
169-
yaml_edit:
170-
path: ../../third_party/pkg/yaml_edit

pkg/analysis_server_client/pubspec.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ publish_to: none
1212
environment:
1313
sdk: ^3.5.0
1414

15+
resolution: workspace
16+
1517
# Use 'any' constraints here; we get our versions from the DEPS file.
1618
dependencies:
1719
path: any

pkg/analysis_server_plugin/pubspec.yaml

Lines changed: 1 addition & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ repository: https://github.com/dart-lang/sdk/tree/main/pkg/analysis_server_plugi
66
environment:
77
sdk: ^3.5.0
88

9+
resolution: workspace
910

1011
dependencies:
1112
analyzer: ^7.3.0
@@ -21,127 +22,3 @@ dev_dependencies:
2122
test_reflective_loader: any
2223
test: any
2324

24-
# These dependency overrides are present in order to allow publishing this
25-
# package. Otherwise, `dart pub publish` complains, even though they are dev
26-
# dependencies.
27-
dependency_overrides:
28-
_fe_analyzer_shared:
29-
path: ../_fe_analyzer_shared
30-
analyzer:
31-
path: ../analyzer
32-
analyzer_plugin:
33-
path: ../analyzer_plugin
34-
analyzer_utilities:
35-
path: ../analyzer_utilities
36-
args:
37-
path: ../../third_party/pkg/args
38-
async:
39-
path: ../../third_party/pkg/async
40-
boolean_selector:
41-
path: ../../third_party/pkg/boolean_selector
42-
cli_util:
43-
path: ../../third_party/pkg/cli_util
44-
clock:
45-
path: ../../third_party/pkg/clock
46-
collection:
47-
path: ../../third_party/pkg/collection
48-
convert:
49-
path: ../../third_party/pkg/convert
50-
crypto:
51-
path: ../../third_party/pkg/crypto
52-
dart_style:
53-
path: ../../third_party/pkg/dart_style
54-
file:
55-
path: ../../third_party/pkg/file/packages/file
56-
frontend_server_client:
57-
path: ../../third_party/pkg/webdev/frontend_server_client
58-
glob:
59-
path: ../../third_party/pkg/glob
60-
http:
61-
path: ../../third_party/pkg/http/pkgs/http
62-
http_multi_server:
63-
path: ../../third_party/pkg/http_multi_server
64-
http_parser:
65-
path: ../../third_party/pkg/http_parser
66-
intl:
67-
path: ../../third_party/pkg/intl
68-
js:
69-
path: ../js
70-
language_server_protocol:
71-
path: ../../third_party/pkg/language_server_protocol
72-
linter:
73-
path: ../linter
74-
lints:
75-
path: ../../third_party/pkg/lints
76-
logging:
77-
path: ../../third_party/pkg/logging
78-
matcher:
79-
path: ../../third_party/pkg/matcher
80-
memory_usage:
81-
path: ../../third_party/pkg/leak_tracker/pkgs/memory_usage
82-
meta:
83-
path: ../meta
84-
mime:
85-
path: ../../third_party/pkg/tools/pkgs/mime
86-
package_config:
87-
path: ../../third_party/pkg/package_config
88-
path:
89-
path: ../../third_party/pkg/path
90-
pool:
91-
path: ../../third_party/pkg/pool
92-
pub_semver:
93-
path: ../../third_party/pkg/pub_semver
94-
server_plugin:
95-
path: ../server_plugin
96-
shelf:
97-
path: ../../third_party/pkg/shelf/pkgs/shelf
98-
shelf_packages_handler:
99-
path: ../../third_party/pkg/shelf/pkgs/shelf_packages_handler
100-
shelf_static:
101-
path: ../../third_party/pkg/shelf/pkgs/shelf_static
102-
shelf_web_socket:
103-
path: ../../third_party/pkg/shelf/pkgs/shelf_web_socket
104-
source_map_stack_trace:
105-
path: ../../third_party/pkg/tools/pkgs/source_map_stack_trace
106-
source_maps:
107-
path: ../../third_party/pkg/source_maps
108-
source_span:
109-
path: ../../third_party/pkg/source_span
110-
stack_trace:
111-
path: ../../third_party/pkg/stack_trace
112-
stream_channel:
113-
path: ../../third_party/pkg/stream_channel
114-
string_scanner:
115-
path: ../../third_party/pkg/string_scanner
116-
telemetry:
117-
path: ../telemetry
118-
term_glyph:
119-
path: ../../third_party/pkg/term_glyph
120-
test:
121-
path: ../../third_party/pkg/test/pkgs/test
122-
test_api:
123-
path: ../../third_party/pkg/test/pkgs/test_api
124-
test_core:
125-
path: ../../third_party/pkg/test/pkgs/test_core
126-
test_descriptor:
127-
path: ../../third_party/pkg/test_descriptor
128-
test_reflective_loader:
129-
path: ../../third_party/pkg/test_reflective_loader
130-
typed_data:
131-
path: ../../third_party/pkg/typed_data
132-
unified_analytics:
133-
path: ../../third_party/pkg/tools/pkgs/unified_analytics
134-
usage:
135-
path: ../../third_party/pkg/usage
136-
vm_service:
137-
path: ../vm_service
138-
watcher:
139-
path: ../../third_party/pkg/watcher
140-
web_socket_channel:
141-
path: ../../third_party/pkg/web_socket_channel
142-
webkit_inspection_protocol:
143-
path: ../../third_party/pkg/webkit_inspection_protocol
144-
yaml:
145-
path: ../../third_party/pkg/yaml
146-
yaml_edit:
147-
path: ../../third_party/pkg/yaml_edit

pkg/analyzer/pubspec.yaml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ repository: https://github.com/dart-lang/sdk/tree/main/pkg/analyzer
77
environment:
88
sdk: ^3.5.0
99

10+
resolution: workspace
1011

1112
dependencies:
1213
_fe_analyzer_shared: ^80.0.0
@@ -39,17 +40,3 @@ dev_dependencies:
3940
test_reflective_loader: any
4041
vm_service: any
4142

42-
# These dependency overrides are present in order to allow publishing this
43-
# package. Otherwise, `dart pub publish` complains, even though they are dev
44-
# dependencies.
45-
dependency_overrides:
46-
_fe_analyzer_shared:
47-
path: ../_fe_analyzer_shared
48-
analyzer_utilities:
49-
path: ../analyzer_utilities
50-
heap_snapshot:
51-
path: ../heap_snapshot
52-
linter:
53-
path: ../linter
54-
vm_service:
55-
path: ../vm_service

pkg/analyzer_cli/pubspec.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ publish_to: none
77
environment:
88
sdk: ^3.7.0
99

10+
resolution: workspace
11+
1012
# Use 'any' constraints here; we get our versions from the DEPS file.
1113
dependencies:
1214
analyzer: any

pkg/analyzer_plugin/pubspec.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ repository: https://github.com/dart-lang/sdk/tree/main/pkg/analyzer_plugin
66
environment:
77
sdk: ^3.5.0
88

9+
resolution: workspace
910

1011
dependencies:
1112
analyzer: ^7.2.0
@@ -26,12 +27,3 @@ dev_dependencies:
2627
meta: any
2728
test_reflective_loader: any
2829
test: any
29-
30-
# These dependency overrides are present in order to allow publishing this
31-
# package. Otherwise, `dart pub publish` complains, even though they are dev
32-
# dependencies.
33-
dependency_overrides:
34-
analyzer_utilities:
35-
path: ../analyzer_utilities
36-
linter:
37-
path: ../linter

0 commit comments

Comments
 (0)