Skip to content

v2: extract fix-update logic to v2/cmd/gazelle/update#2276

Merged
jayconrod merged 10 commits intomasterfrom
v2-2-extract-update
Jan 28, 2026
Merged

v2: extract fix-update logic to v2/cmd/gazelle/update#2276
jayconrod merged 10 commits intomasterfrom
v2-2-extract-update

Conversation

@jayconrod
Copy link
Copy Markdown
Contributor

What type of PR is this?

Other

What package or component does this PR mostly affect?

v2/cmd/gazelle/update

What does this PR do? Why is it needed?

This new package now implements Gazelle's core fix/update functionality. cmd/gazelle and v2/cmd/gazelle will both we wrappers around this, though the update-repos command will remain in v1, since we're dropping it in v2.

Also modifed go_repository_tools to work in module mode, since it would actually require deeper changes to continue working in GOPATH mode.

Which issues(s) does this PR fix?

For #2272

Other notes for review

Also copied internal/wspace. It's an internal package, so it can't be moved and forwarded unfortunately.

Still a pretty old version, but a year newer than what we had before.
This gives us fancy range loops.

Removed some apparently unused compatibility definitions referencing
multiple versions of Go.

For #2272
go.work is unrelated to the Bazel build. It keeps my editor happy without
gopackagesdriver. Bazel needs to rebuild all of gazelle after every change
via go_repository_tools, so gopackagesdriver isn't really usable.

For #2272
This new package now implements Gazelle's core fix/update functionality.
cmd/gazelle and v2/cmd/gazelle will both we wrappers around this, though
the update-repos command will remain in v1, since we're dropping it in v2.

Also modifed go_repository_tools to work in module mode, since it would
actually require deeper changes to continue working in GOPATH mode.

For #2272
@jayconrod jayconrod requested a review from fmeum January 25, 2026 23:00
Copy link
Copy Markdown
Member

@fmeum fmeum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So glad to see this GOPATH dependency go away!

Comment thread internal/go_repository_tools.bzl Outdated
Comment thread v2/internal/wspace/finder.go
Base automatically changed from v2-1-mod to master January 27, 2026 21:18
@jayconrod jayconrod enabled auto-merge (squash) January 28, 2026 21:32
@jayconrod jayconrod merged commit 42f187a into master Jan 28, 2026
17 checks passed
@jayconrod jayconrod deleted the v2-2-extract-update branch January 28, 2026 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants