Skip to content
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

tools/bazel detection is broken with bzlmod repos #20509

Closed
siddharthab opened this issue Dec 12, 2023 · 4 comments
Closed

tools/bazel detection is broken with bzlmod repos #20509

siddharthab opened this issue Dec 12, 2023 · 4 comments
Labels
team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug untriaged

Comments

@siddharthab
Copy link
Contributor

Description of the bug:

Bazel's launcher script checks for only WORKSPACE and WORKSPACE.bazel files, and not MODULE.bazel, so the workspace is not detected as a workspace, and hence, a tools/bazel file is not picked up from the workspace.

Which category does this issue belong to?

No response

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

In any bazel workspace with bzlmod enabled:

  1. Delete WORKSPACE and WORKSPACE.bazel files if any.
  2. Write a tools/bazel file that prints something before running bazel with all passed arguments.
  3. Run any bazel command; notice that tools/bazel is not being run.

Which operating system are you running Bazel on?

Linux

What is the output of bazel info release?

release 7.0.0

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

@Wyverald
Copy link
Member

@bazel-io fork 7.1.0

@Wyverald
Copy link
Member

should probably also consider this for 7.0.1, should the need arise

@iancha1992 iancha1992 added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Dec 12, 2023
@iancha1992
Copy link
Member

@bazel-io fork 7.0.1

bazel-io pushed a commit to bazel-io/bazel that referenced this issue Dec 18, 2023
Fixes bazelbuild#20509.

Closes bazelbuild#20510.

PiperOrigin-RevId: 590328908
Change-Id: I5023450d7c1e23ee52e9cd7291aaf843e7365cc2
iancha1992 pushed a commit that referenced this issue Dec 18, 2023
…0594)

Fixes #20509.

Closes #20510.

Commit
e11506f

PiperOrigin-RevId: 590328908
Change-Id: I5023450d7c1e23ee52e9cd7291aaf843e7365cc2

Co-authored-by: Siddhartha Bagaria <starsid@gmail.com>
@iancha1992
Copy link
Member

A fix for this issue has been included in Bazel 7.0.1 RC2. Please test out the release candidate and report any issues as soon as possible. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug untriaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants