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

cmd/go: remove legacy conversions #53327

Open
rsc opened this issue Jun 10, 2022 · 4 comments
Open

cmd/go: remove legacy conversions #53327

rsc opened this issue Jun 10, 2022 · 4 comments
Assignees
Labels
GoCommand NeedsFix
Milestone

Comments

@rsc
Copy link
Contributor

@rsc rsc commented Jun 10, 2022

The go command contains code to automatically populate go.mod during 'go mod init' using the metadata from various now very old, outdated Go dependency managers. The code is complex, so it needed a good test (testdata/script/mod_convert.txt), which fetches very old versions of various actual packages.

The code has little benefit today, as it can only possibly work on ancient programs, and everyone who was going to update to Go modules has done so at this point. At the same time, the test is now one of the longest tests in cmd/go. We pay a high cost for this code that no one needs anymore.

Let's just delete the code and the test.

@rsc rsc added this to the Go1.20 milestone Jun 10, 2022
@rsc
Copy link
Contributor Author

@rsc rsc commented Jun 10, 2022

/cc @bcmills @matloob

@rsc rsc self-assigned this Jun 10, 2022
@rsc rsc added the NeedsFix label Jun 10, 2022
@seankhliao seankhliao added the GoCommand label Jun 10, 2022
@oiooj
Copy link
Member

@oiooj oiooj commented Jun 12, 2022

Since I am also involved in the development of mod conversions, I‘d like to do this work.

@mvdan
Copy link
Member

@mvdan mvdan commented Jun 12, 2022

Should we somehow point users trying to convert to modules to the latest Go version that still supported that automation in go mod init? It would likely still be better than doing it by hand for some time.

@bcmills
Copy link
Member

@bcmills bcmills commented Jun 17, 2022

Not to mention, the conversion code had some bugs and never really worked properly to begin with (see #33406, perhaps others). 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand NeedsFix
Projects
None yet
Development

No branches or pull requests

5 participants