Skip to content

enable_bzlmod: Flip the default value of --enable_bzlmod to true #18958

@meteorcloudy

Description

@meteorcloudy

We plan to enable Bzlmod by default in Bazel 7.

Summary

--enable_bzlmod is enabled by default. Bazel will try to fetch external dependencies from MODULE.bazel, if the requested external dependency is not found, it will fallback to fetch dependencies from WORKSPACE.

Incompatible changes

TODO: write more guidance for common issues users may encounter

  • Canonical label string must start with @@
  • The workspace name for the main repo will be fixed to _main
  • Runfiles libraries must be used to access runfiles with apparent repo name.
  • @bazel_tools fetched from Bzlmod.

Migration

Bazel users are encouraged to migrate to Bzlmod. The migration guide is available at https://bazel.build/external/migration

If your project or dependencies are not yet ready for Bzlmod, you can disable Bzlmod by --noenable_bzlmod .

And please feel free to

Metadata

Metadata

Assignees

Labels

P1I'll work on this now. (Assignee required)area-BzlmodBzlmod-specific PRs, issues, and feature requestsbreaking-change-7.0Incompatible flags to be flipped in Bazel 7.0incompatible-changeIncompatible/breaking changemigration-readyIncompatible flag is ready for migration with Bazel rolling releases or Bazel@last_greenteam-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.type: feature request

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions