Skip to content

chore: drop CHROMIUM_BUILDTOOLS_PATH in favor of a buildtools symlink#855

Open
codebytere wants to merge 1 commit intomainfrom
drop-chromium-buildtools-path
Open

chore: drop CHROMIUM_BUILDTOOLS_PATH in favor of a buildtools symlink#855
codebytere wants to merge 1 commit intomainfrom
drop-chromium-buildtools-path

Conversation

@codebytere
Copy link
Copy Markdown
Member

depot_tools added a stderr warning in CL:7790518 declaring the env var "highly unsupported and may break gn."

We were setting it because Electron's gclient solution is named src/electron, so depot_tools' auto-detection looks for buildtools at <root>/src/electron/buildtools and <root>/buildtools — neither exists in our layout (the real dir is <root>/src/buildtools).

Add ensureBuildtoolsSymlink() that creates <root>/buildtools -> src/buildtools (dir symlink on POSIX, junction on Windows). That satisfies depot_tools' supported <gclient_root>/buildtools lookup and lets us drop the env var entirely.

Wire the helper into e init, e sync, e worktree add, and sanitizeConfig so new and existing checkouts are migrated transparently. sanitizeConfig also strips CHROMIUM_BUILDTOOLS_PATH from saved configs on load. The schema keeps it as an optional field for backwards compatibility but no longer requires it.

@codebytere codebytere changed the title drop CHROMIUM_BUILDTOOLS_PATH in favor of a buildtools symlink chore: drop CHROMIUM_BUILDTOOLS_PATH in favor of a buildtools symlink Apr 30, 2026
depot_tools added a stderr warning in CL:7790518
("gn: print if CHROMIUM_BUILDTOOLS_PATH is used") declaring the env
var "highly unsupported and may break gn."

We were setting it because Electron's gclient solution is named
`src/electron`, so depot_tools' auto-detection looks for buildtools
at `<root>/src/electron/buildtools` and `<root>/buildtools` — neither
exists in our layout (the real dir is `<root>/src/buildtools`).

Add ensureBuildtoolsSymlink() that creates `<root>/buildtools` ->
`src/buildtools` (dir symlink on POSIX, junction on Windows). That
satisfies depot_tools' supported `<gclient_root>/buildtools` lookup
and lets us drop the env var entirely.

Wire the helper into `e init`, `e sync`, `e worktree add`, and
sanitizeConfig so new and existing checkouts are migrated
transparently. sanitizeConfig also strips CHROMIUM_BUILDTOOLS_PATH
from saved configs on load. The schema keeps it as an optional field
for backwards compatibility but no longer requires it.
@codebytere codebytere force-pushed the drop-chromium-buildtools-path branch from 4e57cdf to dfb9ea7 Compare April 30, 2026 08:13
@codebytere codebytere marked this pull request as ready for review April 30, 2026 08:13
@codebytere codebytere requested review from a team and ckerr as code owners April 30, 2026 08:13
@codebytere codebytere requested a review from dsanders11 April 30, 2026 08:13
Copy link
Copy Markdown
Member

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this change is causing a failure on Windows

Copy link
Copy Markdown
Member

@dsanders11 dsanders11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving this open for now in case it doesn't work out, but I think #859 is the approach we want to take to ensure maximum compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants