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

Migrates the bulk of flutter/engine to pub workspaces. #54157

Merged
merged 6 commits into from
Jul 27, 2024
Merged
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
13 changes: 11 additions & 2 deletions build/dart/rules.gni
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,22 @@ template("flutter_snapshot") {
template("application_snapshot") {
assert(defined(invoker.main_dart), "Must specify 'main_dart'")
assert(defined(invoker.training_args), "Must specify 'training_args'")
assert(defined(invoker.package_config), "Must specify 'package_config'")

main_dart = invoker.main_dart
training_args = invoker.training_args
package_config = rebase_path(invoker.package_config)
name = target_name

package_config = ""
if (defined(invoker.package_config)) {
package_config = rebase_path(invoker.package_config, root_build_dir)
} 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")
}

extra_deps = []
if (defined(invoker.deps)) {
extra_deps += invoker.deps
Expand Down
1 change: 0 additions & 1 deletion ci/licenses_golden/excluded_files
Original file line number Diff line number Diff line change
Expand Up @@ -3189,7 +3189,6 @@
../../../flutter/tools/licenses/analysis_options.yaml
../../../flutter/tools/licenses/data
../../../flutter/tools/licenses/lib/README
../../../flutter/tools/licenses/pubspec.lock
../../../flutter/tools/licenses/pubspec.yaml
../../../flutter/tools/licenses/test
../../../flutter/web_sdk
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
30 changes: 22 additions & 8 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,33 @@ environment:

# Declare all packages that are part of the workspace.
workspace:
- ci
- testing/benchmark
- testing/dart
- testing/litetest
- testing/pkg_test_demo
- testing/scenario_app
- testing/skia_gold_client
- testing/smoke_test_failure
- testing/symbols
- tools/android_lint
- tools/api_check
- tools/build_bucket_golden_scraper
- tools/clang_tidy
- tools/clangd_check
- tools/compare_goldens
- tools/const_finder
- tools/dir_contents_diff
- tools/engine_tool
- tools/header_guard_check
- tools/gen_web_locale_keymap
- tools/githooks
- tools/licenses
- tools/path_ops/dart
- tools/golden_tests_harvester
- tools/pkg/engine_build_configs
- tools/pkg/engine_repo_tools
- tools/pkg/git_repo_tools
- tools/pkg/process_fakes

# Declare all dependencies that are used by one or more packages.
Expand Down Expand Up @@ -154,6 +172,8 @@ dependency_overrides:
path: ./third_party/dart/pkg/_macros
analyzer:
path: ./third_party/dart/pkg/analyzer
archive:
path: ./third_party/pkg/archive
args:
path: ./third_party/dart/third_party/pkg/args
async:
Expand All @@ -170,12 +190,6 @@ dependency_overrides:
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:
Expand All @@ -190,8 +204,6 @@ dependency_overrides:
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:
Expand All @@ -208,6 +220,8 @@ dependency_overrides:
path: ./third_party/pkg/io
js:
path: ./third_party/dart/pkg/js
kernel:
path: ./third_party/dart/pkg/kernel
logging:
path: ./third_party/dart/third_party/pkg/logging
macros:
Expand Down
1 change: 0 additions & 1 deletion testing/smoke_test_failure/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ foreach(test, tests) {
flutter_frontend_server("compile_$test") {
main_dart = test
kernel_output = "$root_gen_dir/$test.dill"
package_config = ".dart_tool/package_config.json"
}
}

Expand Down
25 changes: 5 additions & 20 deletions testing/smoke_test_failure/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,13 @@

name: smoke_test_failure
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/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:
litetest: any

dependency_overrides:
async_helper:
path: ../../third_party/dart/pkg/async_helper
expect:
path: ../../third_party/dart/pkg/expect
litetest:
path: ../litetest
meta:
path: ../../third_party/dart/pkg/meta
smith:
path: ../../third_party/dart/pkg/smith
30 changes: 6 additions & 24 deletions tools/android_lint/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,15 @@
# found in the LICENSE file.

name: android_lint
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.
publish_to: none

# 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.5.0-294.0.dev

# This package is managed as part of the engine workspace.
resolution: workspace
dependencies:
args: any
path: any
process: any

dependency_overrides:
args:
path: ../../third_party/dart/third_party/pkg/args
file:
path: ../../third_party/dart/third_party/pkg/file/packages/file
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
73 changes: 4 additions & 69 deletions tools/api_check/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,12 @@
name: apicheck
publish_to: none

# Do not add any dependencies that require more than what is provided in
# //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

# 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
# This package is managed as part of the engine workspace.
resolution: workspace

dependencies:
analyzer: any
Expand All @@ -36,55 +23,3 @@ dev_dependencies:
litetest: any
path: any
smith: any

dependency_overrides:
_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
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
convert:
path: ../../third_party/dart/third_party/pkg/convert
crypto:
path: ../../third_party/dart/third_party/pkg/crypto
dart_internal:
path: ../../third_party/dart/pkg/dart_internal
expect:
path: ../../third_party/dart/pkg/expect
file:
path: ../../third_party/dart/third_party/pkg/file/packages/file
glob:
path: ../../third_party/dart/third_party/pkg/glob
litetest:
path: ../../testing/litetest
meta:
path: ../../third_party/dart/pkg/meta
macros:
path: ../../third_party/dart/pkg/macros
package_config:
path: ../../third_party/dart/third_party/pkg/package_config
path:
path: ../../third_party/dart/third_party/pkg/path
pub_semver:
path: ../../third_party/dart/third_party/pkg/pub_semver
source_span:
path: ../../third_party/dart/third_party/pkg/source_span
string_scanner:
path: ../../third_party/dart/third_party/pkg/string_scanner
term_glyph:
path: ../../third_party/dart/third_party/pkg/term_glyph
typed_data:
path: ../../third_party/dart/third_party/pkg/typed_data
watcher:
path: ../../third_party/dart/third_party/pkg/watcher
yaml:
path: ../../third_party/dart/third_party/pkg/yaml
smith:
path: ../../third_party/dart/pkg/smith
31 changes: 4 additions & 27 deletions tools/build_bucket_golden_scraper/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,12 @@

name: build_bucket_golden_scraper
publish_to: none
# Required for workspace support.
environment:
sdk: '>=3.2.0-0 <4.0.0'
sdk: ^3.5.0-294.0.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
# This package is managed as part of the engine workspace.
resolution: workspace

dependencies:
args: any
Expand All @@ -27,21 +22,3 @@ dev_dependencies:
expect: any
litetest: any
smith: any

dependency_overrides:
async_helper:
path: ../../third_party/dart/pkg/async_helper
args:
path: ../../third_party/dart/third_party/pkg/args
engine_repo_tools:
path: ../pkg/engine_repo_tools
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
Loading