Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move top-level packages, and testing/*, to pub workspaces #53997

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ analyzer:
# Fixture depends on dart:ui and raises false positives.
- flutter_frontend_server/test/fixtures/lib/main.dart
- prebuilts
# TODO(matanlurey) Follow-up with bdero@ on why needed; https://github.com/flutter/flutter/issues/152002.
- lib/gpu
- third_party
- shell/platform/fuchsia

Expand Down
15 changes: 12 additions & 3 deletions build/dart/rules.gni
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,17 @@ template("flutter_frontend_server") {
template("flutter_snapshot") {
assert(!is_fuchsia)
assert(defined(invoker.main_dart), "main_dart is a required parameter.")
assert(defined(invoker.package_config),
"package_config is a required parameter.")

package_config = ""
if (defined(invoker.package_config)) {
package_config = invoker.package_config
} else {
# Use the root engine package config by default.
# As we move towards a single pub workspace for the engine, this will be
# the correct package config to use, as we will no longer have a per-package
# .dart_tool/package_config.json.
package_config = rebase_path("//flutter/.dart_tool/package_config.json")
}

kernel_target = "_${target_name}_kernel"
snapshot_target = "_${target_name}_snapshot"
Expand Down Expand Up @@ -172,7 +181,7 @@ template("flutter_snapshot") {

flutter_frontend_server(kernel_target) {
main_dart = invoker.main_dart
package_config = invoker.package_config
package_config = package_config
kernel_output = kernel_output
extra_args = extra_frontend_server_args
}
Expand Down
4 changes: 3 additions & 1 deletion ci/analyze.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ echo ""
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/ci"
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/flutter_frontend_server"
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/impeller/tessellator/dart"
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/lib/gpu"
# TODO(bdero): Re-enable this once the analysis issues are fixed.
# See https://github.com/flutter/flutter/issues/152002
# "$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/lib/gpu"
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/lib/ui"
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/testing"
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/tools"
Expand Down
2 changes: 0 additions & 2 deletions ci/licenses_golden/excluded_files
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@
../../../flutter/impeller/tools/metal_library.py
../../../flutter/impeller/tools/xxd.py
../../../flutter/impeller/typographer/typographer_unittests.cc
../../../flutter/lib/gpu/analysis_options.yaml
../../../flutter/lib/gpu/pubspec.yaml
../../../flutter/lib/snapshot/libraries.json
../../../flutter/lib/snapshot/libraries.yaml
Expand Down Expand Up @@ -421,7 +420,6 @@
../../../flutter/shell/profiling/sampling_profiler_unittest.cc
../../../flutter/shell/testing
../../../flutter/shell/vmservice/.dart_tool
../../../flutter/shell/vmservice/pubspec.lock
../../../flutter/shell/vmservice/pubspec.yaml
../../../flutter/sky/packages/sky_engine/.gitignore
../../../flutter/sky/packages/sky_engine/LICENSE
Expand Down
42 changes: 5 additions & 37 deletions ci/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,13 @@

name: ci_scripts
publish_to: none
environment:
sdk: '>=3.2.0-0 <4.0.0'

# Do not add any dependencies that require more than what is provided in
# //third_party/pkg, //third_party/dart/pkg, or
# //third_party/dart/third_party/pkg. In particular, package:test is not usable
# here.
# Required for workspace support.
environment:
sdk: ^3.5.0-294.0.dev

# If you do add packages here, make sure you can run `pub get --offline`, and
# check the .packages and .package_config to make sure all the paths are
# relative to this directory into //third_party/dart
# This package is managed as part of the engine workspace.
resolution: workspace

dependencies:
args: any
Expand All @@ -27,31 +23,3 @@ dev_dependencies:
async_helper: any
expect: any
litetest: any

dependency_overrides:
args:
path: ../third_party/dart/third_party/pkg/args
async:
path: ../third_party/dart/third_party/pkg/async
async_helper:
path: ../third_party/dart/pkg/async_helper
collection:
path: ../third_party/dart/third_party/pkg/collection
expect:
path: ../third_party/dart/pkg/expect
file:
path: ../third_party/dart/third_party/pkg/file/packages/file
litetest:
path: ../testing/litetest
meta:
path: ../third_party/dart/pkg/meta
path:
path: ../third_party/dart/third_party/pkg/path
platform:
path: ../third_party/pkg/platform
process:
path: ../third_party/pkg/process
process_runner:
path: ../third_party/pkg/process_runner
smith:
path: ../third_party/dart/pkg/smith
32 changes: 5 additions & 27 deletions flutter_frontend_server/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,14 @@

name: flutter_frontend_server
publish_to: none
version: 0.1.1-dev
description: Communication pipe to Dart Frontend
homepage: https://flutter.dev

# Do not add any dependencies that require more than what is provided in
# //third_party/pkg, //third_party/dart/pkg or
# //third_party/dart/third_party/pkg. In particular, package:test is not usable
# here.

# If you do add packages here, make sure you can run `pub get --offline`, and
# check the .packages and .package_config to make sure all the paths are
# relative to this directory into //third_party/dart

# Required for workspace support.
environment:
sdk: '>=3.2.0-0 <4.0.0'
sdk: ^3.5.0-294.0.dev

# This package is managed as part of the engine workspace.
resolution: workspace

dev_dependencies:
litetest: any
path: any

dependency_overrides:
async_helper:
path: ../third_party/dart/pkg/async_helper
expect:
path: ../third_party/dart/pkg/expect
litetest:
path: ../testing/litetest
meta:
path: ../third_party/dart/pkg/meta
path:
path: ../third_party/dart/third_party/pkg/path
smith:
path: ../third_party/dart/pkg/smith
7 changes: 0 additions & 7 deletions lib/gpu/analysis_options.yaml

This file was deleted.

131 changes: 129 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,18 @@ environment:

# Declare all packages that are part of the workspace.
workspace:
- ci
- flutter_frontend_server
- tools/engine_tool
- shell/vmservice
- testing/benchmark
- testing/dart
- testing/litetest
- testing/pkg_test_demo
- testing/scenario_app
- testing/skia_gold_client
- testing/smoke_test_failure
- testing/symbols

# Declare all dependencies that are used by one or more packages.
#
Expand Down Expand Up @@ -108,6 +119,20 @@ dependencies:
process_runner: any
smith: any

dev_dependencies:
engine_build_configs:
path: ./tools/pkg/engine_build_configs
engine_repo_tools:
path: ./tools/pkg/engine_repo_tools
git_repo_tools:
path: ./tools/pkg/git_repo_tools
litetest:
path: ./testing/litetest
process_fakes:
path: ./tools/pkg/process_fakes
skia_gold_client:
path: ./testing/skia_gold_client

# Instructs pub on how to resolve the dependencies that are part of "DEPS".
#
# For historic reasons, there are ~3 or so places packages might be located:
Expand All @@ -129,45 +154,147 @@ dependencies:
# of available packages here:
# <https://github.com/dart-lang/sdk/blob/main/DEPS>.
dependency_overrides:
_discoveryapis_commons:
path: ./third_party/pkg/googleapis/discoveryapis_commons
_fe_analyzer_shared:
path: ./third_party/dart/pkg/_fe_analyzer_shared
_macros:
path: ./third_party/dart/pkg/_macros
analyzer:
path: ./third_party/dart/pkg/analyzer
args:
path: ./third_party/dart/third_party/pkg/args
async:
path: ./third_party/dart/third_party/pkg/async
async_helper:
path: ./third_party/dart/pkg/async_helper
boolean_selector:
path: ./third_party/dart/third_party/pkg/boolean_selector
collection:
path: ./third_party/dart/third_party/pkg/collection
convert:
path: ./third_party/dart/third_party/pkg/convert
coverage:
path: ./third_party/pkg/coverage
crypto:
path: ./third_party/dart/third_party/pkg/crypto
dir_contents_diff:
path: ./tools/dir_contents_diff
engine_build_configs:
path: ./tools/pkg/engine_build_configs
engine_repo_tools:
path: ./tools/pkg/engine_repo_tools
equatable:
path: ./third_party/pkg/equatable
expect:
path: ./third_party/dart/pkg/expect
file:
path: ./third_party/dart/third_party/pkg/file/packages/file
litetest:
path: ./testing/litetest
ffi:
path: ./third_party/dart/third_party/pkg/native/pkgs/ffi
fixnum:
path: ./third_party/dart/third_party/pkg/fixnum
frontend_server_client:
path: ./third_party/dart/third_party/pkg/webdev/frontend_server_client
gcloud:
path: ./third_party/pkg/gcloud
git_repo_tools:
path: ./tools/pkg/git_repo_tools
glob:
path: ./third_party/dart/third_party/pkg/glob
googleapis:
path: ./third_party/pkg/googleapis/generated/googleapis
googleapis_auth:
path: ./third_party/pkg/googleapis/googleapis_auth
http:
path: ./third_party/dart/third_party/pkg/http/pkgs/http
http_multi_server:
path: ./third_party/dart/third_party/pkg/http_multi_server
http_parser:
path: ./third_party/dart/third_party/pkg/http_parser
io:
path: ./third_party/pkg/io
js:
path: ./third_party/dart/pkg/js
logging:
path: ./third_party/dart/third_party/pkg/logging
macros:
path: ./third_party/dart/pkg/macros
matcher:
path: ./third_party/dart/third_party/pkg/matcher
meta:
path: ./third_party/dart/pkg/meta
metrics_center:
path: ./third_party/pkg/flutter_packages/packages/metrics_center
mime:
path: ./third_party/dart/third_party/pkg/mime
node_preamble:
path: ./third_party/pkg/node_preamble
package_config:
path: ./third_party/dart/third_party/pkg/package_config
path:
path: ./third_party/dart/third_party/pkg/path
platform:
path: ./third_party/pkg/platform
pool:
path: ./third_party/dart/third_party/pkg/pool
process:
path: ./third_party/pkg/process
protobuf:
path: ./third_party/dart/third_party/pkg/protobuf/protobuf
process_fakes:
path: ./tools/pkg/process_fakes
process_runner:
path: ./third_party/pkg/process_runner
pub_semver:
path: ./third_party/dart/third_party/pkg/pub_semver
shelf:
path: ./third_party/dart/third_party/pkg/shelf/pkgs/shelf
shelf_packages_handler:
path: ./third_party/dart/third_party/pkg/shelf/pkgs/shelf_packages_handler
shelf_static:
path: ./third_party/dart/third_party/pkg/shelf/pkgs/shelf_static
shelf_web_socket:
path: ./third_party/dart/third_party/pkg/shelf/pkgs/shelf_web_socket
smith:
path: ./third_party/dart/pkg/smith
source_map_stack_trace:
path: ./third_party/dart/third_party/pkg/source_map_stack_trace
source_maps:
path: ./third_party/dart/third_party/pkg/source_maps
source_span:
path: ./third_party/dart/third_party/pkg/source_span
stack_trace:
path: ./third_party/dart/third_party/pkg/stack_trace
stream_channel:
path: ./third_party/dart/third_party/pkg/stream_channel
string_scanner:
path: ./third_party/dart/third_party/pkg/string_scanner
term_glyph:
path: ./third_party/dart/third_party/pkg/term_glyph
test:
path: ./third_party/dart/third_party/pkg/test/pkgs/test
test_api:
path: ./third_party/dart/third_party/pkg/test/pkgs/test_api
test_core:
path: ./third_party/dart/third_party/pkg/test/pkgs/test_core
typed_data:
path: ./third_party/dart/third_party/pkg/typed_data
vector_math:
path: ./third_party/pkg/vector_math
vm_service:
path: ./third_party/dart/pkg/vm_service
vm_service_protos:
path: ./third_party/dart/pkg/vm_service_protos
watcher:
path: ./third_party/dart/third_party/pkg/watcher
web:
path: ./third_party/dart/third_party/pkg/web
web_socket:
path: ./third_party/dart/third_party/pkg/http/pkgs/web_socket
web_socket_channel:
path: ./third_party/dart/third_party/pkg/web_socket_channel
webkit_inspection_protocol:
path: ./third_party/dart/third_party/pkg/webkit_inspection_protocol
yaml:
path: ./third_party/dart/third_party/pkg/yaml
1 change: 0 additions & 1 deletion shell/vmservice/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ import("//flutter/build/dart/rules.gni")
# Build a minimal snapshot that can be used to launch the VM service isolate.
flutter_snapshot("vmservice_snapshot") {
main_dart = "empty.dart"
package_config = ".dart_tool/package_config.json"
output_aot_lib = "libvmservice_snapshot.so"
}
7 changes: 6 additions & 1 deletion shell/vmservice/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,10 @@

name: vmservice_snapshot
publish_to: none

# Required for workspace support.
environment:
sdk: '>=3.2.0-0 <4.0.0'
sdk: ^3.5.0-294.0.dev

# This package is managed as part of the engine workspace.
resolution: workspace
Loading