-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Flip --enable_workspace to false #23023
Copy link
Copy link
Closed
Labels
P1I'll work on this now. (Assignee required)I'll work on this now. (Assignee required)area-BzlmodBzlmod-specific PRs, issues, and feature requestsBzlmod-specific PRs, issues, and feature requestsbreaking-change-8.0incompatible-changeIncompatible/breaking changeIncompatible/breaking changeteam-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.External dependency handling, remote repositiories, WORKSPACE file.type: feature request
Metadata
Metadata
Assignees
Labels
P1I'll work on this now. (Assignee required)I'll work on this now. (Assignee required)area-BzlmodBzlmod-specific PRs, issues, and feature requestsBzlmod-specific PRs, issues, and feature requestsbreaking-change-8.0incompatible-changeIncompatible/breaking changeIncompatible/breaking changeteam-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.External dependency handling, remote repositiories, WORKSPACE file.type: feature request
Motivation
Disabling WORKSPACE by default is the next step towards migrating the Bazel ecosystem to Bzlmod for managing external dependencies.
Benefits of Bzlmod over WORKSPACE:
bazel modWe plan to remove this flag and the entire WORKSPACE logic in Bazel 9.
For more information, check https://bazel.build/external/overview
Description
With
--enable_workspacedefaults to false, the WORKSPACE file is no longer needed and does not take any effect in a Bazel project.You should expect the following breaking behaviours:
If all your external dependencies have migrated to Bzlmod, WORSPACE and WORKSPACE.bzlmod files can be safely deleted. Otherwise, you can temporarily enable WORKSPACE via
--enable_workspace=true.Incompatible Flag
--noenable_workspace
Migration Guide
Please refer to https://bazel.build/external/migration on how to migrate from WORKSPACE to Bzlmod.
We'll continue to improve the migration guide on common issues and best practices, PRs from the community are also welcomed!
And please feel free to report issues that are blocking your migration.
In which Bazel LTS version will this incompatible change be enabled?
Bazel 8
Additional Context
No response
TODO List