-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Flip --enable_workspace to false #23023
Comments
…zlmod are false WorkspaceNameFunction is the first one to fail when those two flags are off. Working towards: #23023 PiperOrigin-RevId: 656006850 Change-Id: I4f7dda4cc3c2b19085d22490fd457fc53f267ed6
- Added functions for setting up common dependencies in MODULE.bazel - Use a shorter bazel_root on Windows - Added setup_module_dot_bazel to replace write_default_lockfile eventually - Removed TEST_REPOSITORY_HOME support A part of #23087 Working towards: #23023 PiperOrigin-RevId: 660748611 Change-Id: I55193953b429c18414ec092f567c98af36d7c34a
- Better error message when //external is used when WORKSPACE is disabled. - Warn about WORKSPACE deprecation in Bazel 9 when WORKSPACE is evaluated. Related: #23023 PiperOrigin-RevId: 668104976 Change-Id: I967c4a34432847f3b83b4cd651a46c8376a29124
I was daydreaming a bit about what we could do after 8.0 is cut:
Clock's ticking... rubs hands |
All look very attractive! I just have one small concern: all those changes are technically breaking changes and major refactors, so we're not going to backport them to Bazel 8. That means any further improvement to the external dependency system (e.g. shared repo cache) might be harder to backport due to diverged code. But I guess the benefits of removing WORKSPACE still outweighs the trouble it might cause for backporing. |
We might want to remove the code closer to Bazel 9 to facilitate cherry-picks into Bazel 8. |
Yeah, I think we can try to plan and estimate what kind of major changes we still want to make and backport, then decide when is a good time to start removing WORKSPACE from HEAD. |
Addressing #4078 Related: bazelbuild/bazel#23023
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 mod
We 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_workspace
defaults 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
The text was updated successfully, but these errors were encountered: