Skip to content

x/tools: tag and delete refactor/rename, refactor/importgraph, go/buildutil, cmd/gomvpkg #69538

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

Open
adonovan opened this issue Sep 19, 2024 · 8 comments
Labels
Proposal Proposal-Accepted Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@adonovan
Copy link
Member

adonovan commented Sep 19, 2024

While implementing this proposal:

I immediately realized that most of the logic is not in the cmd package but in the refactor/rename package, which has never worked with Go modules. Similarly, refactor/importgraph and go/buildutil have the same limitation. And cmd/gomvpkg is in a similar state to the (now deleted) cmd/gorename.

I propose to tag and delete all of them following a similar process.

(FWIW, the only seemingly valuable part of go/buildutil is TagsFlag, which doesn't actually work in conjunction with go/packages; one must use the syntax gopackages -buildflag=-tags=... patterns....)

@adonovan adonovan moved this to Incoming in Proposals Sep 19, 2024
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Sep 19, 2024
@gopherbot gopherbot added this to the Unreleased milestone Sep 19, 2024
@ianlancetaylor ianlancetaylor changed the title x/tools/refactor/{rename,importgraph}: tag and delete proposal: x/tools/refactor/{rename,importgraph}: tag and delete Sep 19, 2024
@ianlancetaylor ianlancetaylor modified the milestones: Unreleased, Proposal Sep 19, 2024
@adonovan adonovan changed the title proposal: x/tools/refactor/{rename,importgraph}: tag and delete proposal: x/tools: tag and delete refactor/rename, refactor/importgraph, go/buildutil, cmd/gomvpkg Sep 22, 2024
@gabyhelp
Copy link

Related Issues and Documentation

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/614895 mentions this issue: cmd/{callgraph,ssadump}, gopackages: make -tags flags work

gopherbot pushed a commit to golang/tools that referenced this issue Sep 25, 2024
Previously, the -tags flag used the obsolete buildutil.TagsFlag,
which only affects the behavior of the obsolete go/loader.
This change causes the -tags flag to affect go/packages
in these three tools, as it should.

Updates golang/go#69556
Updates golang/go#69538

Change-Id: Ie45c51c7fe04863dba00bc2f81b0a78f1c9bd0e3
Reviewed-on: https://go-review.googlesource.com/c/tools/+/614895
TryBot-Bypass: Alan Donovan <[email protected]>
Reviewed-by: Michael Matloob <[email protected]>
Auto-Submit: Alan Donovan <[email protected]>
Commit-Queue: Alan Donovan <[email protected]>
@rsc
Copy link
Contributor

rsc commented Dec 4, 2024

This proposal has been added to the active column of the proposals project
and will now be reviewed at the weekly proposal review meetings.
— rsc for the proposal review group

@rsc rsc moved this from Incoming to Active in Proposals Dec 4, 2024
@aclements
Copy link
Member

The proposal is to tag and delete x/tools/refactor/rename, x/tools/refactor/importgraph, x/tools/go/buildutil, and x/tools/cmd/gomvpkg. They'll continue to work as well as they do now, but we won't be updating them.

These tools don't work with modules (importgraph and buildutil deeply assume GOPATH mode) and some are obsoleted by more modern functionality (rename and gomvpkg have equivalents in gopls).

I see the three packages have a significant number of importers, especially buildutil. Perhaps unsurprisingly, many of these importers are in GOPATH mode. Given that these importers won't have version information, what exactly happens to them if we tag and delete these packages? (I'm not saying this should hold up the proposal, but I want to make sure we're transparent here.)

@alandonovan plans to email golang-nuts@ just in case people are using these.

@rsc
Copy link
Contributor

rsc commented Feb 5, 2025

It sounds like @alandonovan still needs to mail golang-nuts.

@adonovan
Copy link
Member Author

It sounds like @alandonovan still needs to mail golang-nuts.

This is now done.

@aclements
Copy link
Member

Based on the discussion above, this proposal seems like a likely accept.
— aclements for the proposal review group

The proposal is to tag and delete x/tools/refactor/rename, x/tools/refactor/importgraph, x/tools/go/buildutil, and x/tools/cmd/gomvpkg. They'll continue to work as well as they do now, but we won't be updating them.

@aclements aclements moved this from Active to Likely Accept in Proposals Feb 26, 2025
@aclements
Copy link
Member

No change in consensus, so accepted. 🎉
This issue now tracks the work of implementing the proposal.
— aclements for the proposal review group

The proposal is to tag and delete x/tools/refactor/rename, x/tools/refactor/importgraph, x/tools/go/buildutil, and x/tools/cmd/gomvpkg. They'll continue to work as well as they do now, but we won't be updating them.

@aclements aclements moved this from Likely Accept to Accepted in Proposals Mar 6, 2025
@aclements aclements changed the title proposal: x/tools: tag and delete refactor/rename, refactor/importgraph, go/buildutil, cmd/gomvpkg x/tools: tag and delete refactor/rename, refactor/importgraph, go/buildutil, cmd/gomvpkg Mar 6, 2025
@aclements aclements modified the milestones: Proposal, Backlog Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Proposal Proposal-Accepted Tools This label describes issues relating to any tools in the x/tools repository.
Projects
Status: Accepted
Development

No branches or pull requests

6 participants