go_deps: don't print version mismatch messages for go.work modules#2325
Merged
go_deps: don't print version mismatch messages for go.work modules#2325
Conversation
Normally, go_deps prints a warning when a module is provided by bazel_dep, and the bazel_dep version does not match the version Go would select. This warning is not actionable for modules that come from go.work files. go.work is used when there are multiple Go modules in the same workspace. Go doesn't allow this outside the main module, but go_deps does. The Go version for each module is not meaningful in this situation. Fixes #2315
78364ee to
71945be
Compare
Contributor
Author
|
@fmeum I think I have this fixed now, sorry for the churn. I'll create a patch release once this lands. I verified this manually by checking out BCR locally, creating a patch release pointing to a local archive, then |
fmeum
approved these changes
Apr 7, 2026
gh-worker-dd-mergequeue-cf854d Bot
pushed a commit
to DataDog/datadog-agent
that referenced
this pull request
Apr 8, 2026
### What does this PR do? - upgrade `gazelle` from 0.48.0 to **0.50.0**, - drop the `git_override` that was pinning to a post-0.48.0 commit. ### Motivation v0.50.0 is in the Bazel Central Registry and includes a more sustainable fix (bazel-contrib/bazel-gazelle#2325) than the `ignore_local_replaced_modules` feature (bazel-contrib/bazel-gazelle#2317) the `git_override` was introduced to get access to. This will allow us to close [ABLD-415](https://datadoghq.atlassian.net/browse/ABLD-415). ### Describe how you validated your changes CI. ### Additional Notes There's another improvement since v0.49.0 we could benefit from: - bazel-contrib/bazel-gazelle#2314 [ABLD-415]: https://datadoghq.atlassian.net/browse/ABLD-415?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ Co-authored-by: regis.desgroppes <regis.desgroppes@datadoghq.com>
Closed
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
What package or component does this PR mostly affect?
What does this PR do? Why is it needed?
Normally, go_deps prints a warning when a module is provided by bazel_dep, and the bazel_dep version does not match the version Go would select.
This warning is not actionable for modules that come from go.work files. go.work is used when there are multiple Go modules in the same workspace. Go doesn't allow this outside the main module, but go_deps does. The Go version for each module is not meaningful in this situation.
Which issues(s) does this PR fix?
Fixes #2315
Other notes for review