Skip to content

Commit

Permalink
crate-universe allows workspaces with MODULE.bazel only (#2720)
Browse files Browse the repository at this point in the history
According to the [migration
guide](https://bazel.build/external/migration), `WORKSPACE.bazel` is no
longer required with Bazel 6.3 or later. This updates `crate_universe`
to respect that, allowing `MODULE.bazel` to be the root marker of a
workspace, without requiring a `WORKSPACE` or `WORKSPACE.bazel`.

Happy to iterate on this.
  • Loading branch information
matt-duch authored Jul 4, 2024
1 parent 3877078 commit 4110601
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crate_universe/src/utils/starlark/label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ impl Label {
}
if workspace_root.is_none()
&& (ancestor.join("WORKSPACE").exists()
|| ancestor.join("WORKSPACE.bazel").exists())
|| ancestor.join("WORKSPACE.bazel").exists()
|| ancestor.join("MODULE.bazel").exists())
{
workspace_root = Some(ancestor);
break;
Expand Down

0 comments on commit 4110601

Please sign in to comment.