-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Add a "pub workspace" to the root of the engine repository #53539
Changes from 3 commits
54d1ca6
2068ba1
fcde54c
50fa853
144ec4a
d78b88a
9f49e49
ff2aa36
7812873
a467fb6
901b47f
4f99625
d1ba509
b4c4186
9485af8
2638753
627d84c
46853e1
339abd3
3ed2f04
d889220
2ba6436
eb2303a
ef6605d
2d727a6
8ee0c85
d2aa032
d1a92b4
d4fa1df
7703083
e0c31a8
784b9d8
77f04a8
da0d118
9ee12d0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,180 @@ | ||
# This file represents a "workspace" that applies to the whole repository. | ||
# | ||
# See <https://flutter.dev/go/pub-workspace> for details. | ||
# | ||
# The `flutter/engine` repository is a quasi-monorepo, with multiple Dart tools | ||
# and packages that are all interdependent. Third party dependencies are managed | ||
# by the `DEPS` file in the root of the repository, and are synced to either the | ||
# `third_party` (i.e. `//flutter/third_party`) or `../third_party` (i.e. | ||
# `//third_party`) directories by `gclient sync`. | ||
# | ||
# Every dependency declared here are dependencies used by _one or more_ of the | ||
# packages in the repository (though there is no enforcement of this). This file | ||
# then generates a `.dart_tool/package_config.json` file that is used by the | ||
# rest of the repository to resolve dependencies. | ||
# | ||
# ============================================================================== | ||
# WORKFLOWS | ||
# ============================================================================== | ||
# | ||
# ------------------------------------------------------------------------------ | ||
# (1) ADDING A NEW DEPENDENCY | ||
# ------------------------------------------------------------------------------ | ||
# Dependencies need to be added either via the DEPS file, or by checking the are | ||
# available in the vendored Dart SDK (see notes below on library locations). If | ||
# they are available, do the following. | ||
# | ||
# See (4) for how to add dependencies to a package in the workspace. | ||
# | ||
# ------------------------------------------------------------------------------ | ||
# (2) CREATING A NEW PACKAGE | ||
# ------------------------------------------------------------------------------ | ||
# If creating a package, say in ./tools or ./tools/pkg, ensure the following | ||
# header in it's respective `pubspec.yaml`: | ||
matanlurey marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# ``` | ||
# # We don't publish packages to pub.dev from the engine repository. | ||
# publish_to: none | ||
# | ||
# # Required for workspace support. | ||
# environment: | ||
# sdk: ^3.5.0-294.0.dev | ||
# | ||
# # This package is managed as part of the engine workspace. | ||
# resolution: workspace | ||
# ``` | ||
# | ||
# See (4) for how to add dependencies to a package in the workspace. | ||
# | ||
# ------------------------------------------------------------------------------ | ||
# (3) MIGRATING A NON-WORKSPACE PACKAGE TO USING THE WORKSPACE | ||
# ------------------------------------------------------------------------------ | ||
# Many packages in this repo are still using a pre-workspace style pubspec.yaml, | ||
# either with manuallu declared `dependency_overrides` (much of ./tools) or by | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. s/manuallu/manually There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done! |
||
# using pub (./web_sdk, ./lib/web_ui). To migrate a package to the workspace: | ||
# | ||
# A. Add the `resolution: workspace` field to the pubspec.yaml. | ||
# B. Update the minimum SDK version to at least `^3.5.0-294.0.dev`. | ||
# C. Add the package to the `workspace` field in this file. | ||
# D. Ensure every dependency in the package is added to the `dependencies` field | ||
# in this file, following instructions in (4). | ||
# | ||
# Once `dart pub get` is run on the workspace, the package will be resolved as | ||
# part of the workspace, and the `dependency_overrides` in this file will be | ||
# applied to the package. | ||
# | ||
# ------------------------------------------------------------------------------ | ||
# (4) ADDING DEPENDENCIES TO A PACKAGE IN THIS WORKSPACE | ||
# ------------------------------------------------------------------------------ | ||
# When adding a dependency to a package in the workspace, add the dependency to | ||
# the `dependencies` field in this file. If the dependency is located within | ||
# the repository, use the `path` field to point to the package. | ||
# | ||
# If the dependency is a third party package, add it to the | ||
# `dependency_overrides` field in this file. The `any` version constraint is | ||
# used to indicate that the version of the package is not important, as it is | ||
# managed by the `DEPS` file. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These comments are phenomenal, excellent work! |
||
|
||
name: _engine_workspace | ||
|
||
# Required for workspace support. | ||
environment: | ||
sdk: ^3.5.0-294.0.dev | ||
|
||
# Declare all packages that are part of the workspace. | ||
workspace: | ||
- tools/engine_tool | ||
|
||
# Declare all dependencies that are used by one or more packages. | ||
# | ||
# A few notes: | ||
# 1. There is no distinction between "dependencies" and "dev_dependencies"; | ||
# those notions are for *publishing* packages, not for managing a workspace. | ||
# Specific packages in the workspace itself will declare whether they are | ||
# dependencies or dev_dependencies, but here it is a union of both. | ||
# | ||
# 2. The `any` version constraint is used to indicate that the version of the | ||
# package is not important, as it is managed by the `DEPS` file. In other | ||
# words, "if the test pass, ship it". | ||
# | ||
# 3. The `path` field is used to indicate the location of the package in the | ||
# local repository itself. This is to *only* be used for local packages that | ||
# are part of the workspace. Third party dependencies are managed by the | ||
# `DEPS` file: they get a "any" version constraint and are overridden in the | ||
# `dependency_overrides` section below. | ||
# | ||
# While not enforced by tooling, try to keep this list in alphabetical order. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You could enable: https://dart.dev/tools/linter-rules/sort_pub_dependencies There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added a TODO for now, thanks! |
||
dependencies: | ||
args: any | ||
async_helper: any | ||
engine_build_configs: | ||
path: ./tools/pkg/engine_build_configs | ||
engine_repo_tools: | ||
path: ./tools/pkg/engine_repo_tools | ||
expect: any | ||
file: any | ||
litetest: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. move There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great suggestion, done! |
||
path: ./testing/litetest | ||
logging: any | ||
meta: any | ||
path: any | ||
platform: any | ||
process_fakes: | ||
path: ./tools/pkg/process_fakes | ||
process_runner: any | ||
smith: any | ||
|
||
# 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: | ||
# | ||
# - `./third_party/pkg/{name}`: for packages vended directly as part of "DEPS". | ||
# Usually these are Flutter engine specific packages, i.e. they did not exist | ||
# in the Dart vended SDK (the other options below). Typically these originate | ||
# from pub (https://pub.dev) and are mirrored into a Google Git repository: | ||
# <https://flutter.googlesource.com/>. | ||
# | ||
# - `./third_party/dart/pkg/{name}`: for packages that lives *in* the Dart SDK, | ||
# which is in turn vendored into the Flutter engine repository. You can see | ||
# a full list of available packages here: | ||
# <https://github.com/dart-lang/sdk/tree/main/pkg>. | ||
# | ||
# - `./third_party/dart/third_party/pkg/{name}`: for packages that are vendored | ||
# into the Dart SDK from pub.dev. These are often first-party packages from | ||
# the Dart team, but not part of the Dart SDK itself. You can see a full list | ||
# of available packages here: | ||
# <https://github.com/dart-lang/sdk/blob/main/DEPS>. | ||
dependency_overrides: | ||
jtmcdole marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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 | ||
logging: | ||
path: ./third_party/dart/third_party/pkg/logging | ||
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 | ||
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 | ||
yaml: | ||
path: ./third_party/dart/third_party/pkg/yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by checking the are available
seems like a typo? Should this not beby checking they are available
, like in the last phrase of this paragraph?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.