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

bazel mod tidy logs a warning for the very thing it's about to fix #24495

Closed
Buzz-Lightyear opened this issue Nov 26, 2024 · 2 comments
Closed
Assignees
Labels
P2 We'll consider working on this in future. (Assignee optional) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: bug

Comments

@Buzz-Lightyear
Copy link

Description of the bug:

bazel mod tidy logs a warning for the very thing it's about to fix, for e.g.:

> bazel mod tidy
WARNING: ...: The module extension go_deps defined in @gazelle//:extensions.bzl reported incorrect imports of repositories via use_repo():

Not imported, but reported as direct dependencies by the extension (may cause the build to fail):
    com_github_hashicorp_go_cleanhttp, com_linkedin_golang_c2s_backend_api_c2s_backend_go_api, com_linkedin_golang_gurney_gurney, com_linkedin_golang_rubiks_api_rubiks_go_api, in_golnkd_nimbus_inventory_manager

Fix the use_repo calls by running 'bazel mod tidy'.
INFO: Updated use_repo calls for @gazelle//:extensions.bzl%go_deps

Re-running doesn't log that warning because bazel mod tidy has already fixed it.

Which category does this issue belong to?

Core

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

Run bazel mod tidy in a situation where you expect updates to MODULE.bazel (say while using any module extension that pulls in new dependencies).

Which operating system are you running Bazel on?

Darwin

What is the output of bazel info release?

release 7.1.2

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 HEAD ?

Why is this relevant?

If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

No response

Have you found anything relevant by searching the web?

No I haven't

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

Issue filed in Gazelle as well: bazel-contrib/bazel-gazelle#1988

@github-actions github-actions bot added the team-Core Skyframe, bazel query, BEP, options parsing, bazelrc label Nov 26, 2024
@haxorz haxorz added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. and removed team-Core Skyframe, bazel query, BEP, options parsing, bazelrc labels Dec 9, 2024
@fmeum fmeum added type: feature request P2 We'll consider working on this in future. (Assignee optional) and removed type: bug untriaged labels Dec 17, 2024
@fmeum fmeum self-assigned this Dec 17, 2024
bazel-io pushed a commit to bazel-io/bazel that referenced this issue Dec 19, 2024
The warnings tell the user to run `bazel mod tidy`, which is very confusing.

Fixes bazelbuild#24495

Closes bazelbuild#24729.

PiperOrigin-RevId: 708007222
Change-Id: I60dc889281a776bbf08a7f9537272d7692cce1d8
github-merge-queue bot pushed a commit that referenced this issue Dec 20, 2024
The warnings tell the user to run `bazel mod tidy`, which is very
confusing.

Fixes #24495

Closes #24729.

PiperOrigin-RevId: 708007222
Change-Id: I60dc889281a776bbf08a7f9537272d7692cce1d8

Commit
455ddb7

Co-authored-by: Fabian Meumertzheim <[email protected]>
fmeum added a commit to fmeum/bazel that referenced this issue Jan 7, 2025
The warnings tell the user to run `bazel mod tidy`, which is very confusing.

Fixes bazelbuild#24495

Closes bazelbuild#24729.

PiperOrigin-RevId: 708007222
Change-Id: I60dc889281a776bbf08a7f9537272d7692cce1d8
(cherry picked from commit 455ddb7)
fmeum added a commit to fmeum/bazel that referenced this issue Jan 7, 2025
The warnings tell the user to run `bazel mod tidy`, which is very confusing.

Fixes bazelbuild#24495

Closes bazelbuild#24729.

PiperOrigin-RevId: 708007222
Change-Id: I60dc889281a776bbf08a7f9537272d7692cce1d8
(cherry picked from commit 455ddb7)
meteorcloudy pushed a commit that referenced this issue Jan 8, 2025
The warnings tell the user to run `bazel mod tidy`, which is very
confusing.

Fixes #24495

Closes #24729.

PiperOrigin-RevId: 708007222
Change-Id: I60dc889281a776bbf08a7f9537272d7692cce1d8 
(cherry picked from commit 455ddb7)

Fixes #24740
@iancha1992
Copy link
Member

A fix for this issue has been included in Bazel 8.0.1 RC1. Please test out the release candidate and report any issues as soon as possible.
If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=8.0.1rc1. Thanks!

@iancha1992
Copy link
Member

A fix for this issue has been included in Bazel 7.5.0 RC2. Please test out the release candidate and report any issues as soon as possible.
If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=7.5.0rc2. Thanks!

fmeum added a commit to fmeum/bazel that referenced this issue Jan 29, 2025
The warnings tell the user to run `bazel mod tidy`, which is very confusing.

Fixes bazelbuild#24495

Closes bazelbuild#24729.

PiperOrigin-RevId: 708007222
Change-Id: I60dc889281a776bbf08a7f9537272d7692cce1d8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants