Instructions
Use this skill to update dependencies in the Dart SDK's DEPS file to their
latest (or a specific) version. This tool automates the process of updating
the version, syncing dependencies, updating package configurations, and
creating a CL.
Prerequisites
Before running the tool, ensure your environment is prepared correctly:
- Clean Git State: Your git checkout MUST be clean. No uncommitted
changes should be present.
- On Main Branch: You MUST be on the
main branch. The tool creates a
new branch from your current HEAD, so being on main ensures the bump
starts from a clean baseline.
Tool Usage
Run the tools/manage_deps.dart script with the bump command from the root
of the SDK.
Command Syntax
dart tools/manage_deps.dart bump <path/to/dependency> \
[--branch <branch_name>] [--target <ref>]
Arguments
<path/to/dependency> (required): The path to the dependency directory
relative to the SDK root. Dependencies are entire repositories and not
packages, so the path will usually be third_party/pkg/<repo>.
- CRITICAL: DO NOT include a trailing slash in the path.
- If unsure of the repository, you can look at the
.dart_tool/package_config.json file relative to the SDK root, and search
for "name": "<package-name>". Next to that you should see a "rootUri"
key which will give you the path to the dependency. Do not use the full
path though, just the top level directory under third_party/pkg/<repo>,
since entire repos are always rolled at once.
- If the
.dart_tool/package_config.json file does not exist, it can be
generated by running gclient sync.
--branch <branch_name> (optional): The name of the branch to create for
this update. Defaults to bump_<dependency_name>.
--target <ref> (optional): The specific git ref (SHA, tag, branch) to
update to. Defaults to the latest version on the remote's default branch.
Example
To bump the unified_analytics dependency, which is a part of the tools repo:
dart tools/manage_deps.dart bump third_party/pkg/tools
Troubleshooting
- "Already at - nothing to do": The dependency is already at the
latest version or the specified target.
- Branch already exists: If the tool says a branch with the target name
already exists, you will be prompted to delete it. Usually, it is safe to say
"y" if you want a fresh bump.
- "CorpSSO login required. To log in, run glogin or gcert": This indicates a
Google-internal SSO authentication failure during fetching/syncing
dependencies. This error and the suggested fix (
gcert / glogin) are only
applicable for Googlers. Since this requires interactive authentication, you
must ask the user to run gcert (or glogin) in their terminal to
authenticate, and then retry.
1---2name: update-dependency3description: Updates third party dependencies in the Dart SDK4---56# Instructions78Use this skill to update dependencies in the Dart SDK's `DEPS` file to their9latest (or a specific) version. This tool automates the process of updating10the version, syncing dependencies, updating package configurations, and11creating a CL.1213## Prerequisites1415Before running the tool, ensure your environment is prepared correctly:16171. **Clean Git State**: Your git checkout MUST be clean. No uncommitted18 changes should be present.192. **On Main Branch**: You MUST be on the `main` branch. The tool creates a20 new branch from your current HEAD, so being on `main` ensures the bump21 starts from a clean baseline.2223## Tool Usage2425Run the `tools/manage_deps.dart` script with the `bump` command from the root26of the SDK.2728### Command Syntax2930```bash31dart tools/manage_deps.dart bump <path/to/dependency> \32 [--branch <branch_name>] [--target <ref>]33```3435### Arguments36371. `<path/to/dependency>` (required): The path to the dependency directory38 relative to the SDK root. Dependencies are entire repositories and not39 packages, so the path will usually be `third_party/pkg/<repo>`.40 - **CRITICAL**: DO NOT include a trailing slash in the path.41 - If unsure of the repository, you can look at the42 `.dart_tool/package_config.json` file relative to the SDK root, and search43 for `"name": "<package-name>"`. Next to that you should see a "rootUri"44 key which will give you the path to the dependency. Do not use the full45 path though, just the top level directory under `third_party/pkg/<repo>`,46 since entire repos are always rolled at once.47 - If the `.dart_tool/package_config.json` file does not exist, it can be48 generated by running `gclient sync`.492. `--branch <branch_name>` (optional): The name of the branch to create for50 this update. Defaults to `bump_<dependency_name>`.513. `--target <ref>` (optional): The specific git ref (SHA, tag, branch) to52 update to. Defaults to the latest version on the remote's default branch.5354## Example5556To bump the `unified_analytics` dependency, which is a part of the `tools` repo:5758```bash59dart tools/manage_deps.dart bump third_party/pkg/tools60```6162## Troubleshooting6364- **"Already at <target> - nothing to do"**: The dependency is already at the65 latest version or the specified target.66- **Branch already exists**: If the tool says a branch with the target name67 already exists, you will be prompted to delete it. Usually, it is safe to say68 "y" if you want a fresh bump.69- **"CorpSSO login required. To log in, run glogin or gcert"**: This indicates a70 Google-internal SSO authentication failure during fetching/syncing71 dependencies. This error and the suggested fix (`gcert` / `glogin`) are only72 applicable for Googlers. Since this requires interactive authentication, you73 must ask the user to run `gcert` (or `glogin`) in their terminal to74 authenticate, and then retry.