-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
Comments
Since I am also involved in the development of mod conversions, I‘d like to do this work. |
Should we somehow point users trying to convert to modules to the latest Go version that still supported that automation in |
Not to mention, the conversion code had some bugs and never really worked properly to begin with (see #33406, perhaps others). 😅 |
May I suggest extracting the code from the go tool and dumping it into some repo where it can be independently installed? A party trick I sometimes do is take a small project that I wrote in 2018 and show that it can be upgraded to the current version of Go in less than a minute, while the JavaScript dependencies in the project basically can't be installed at all, let alone upgraded. I would hate for my trick to stop working. :-) More seriously, it would be nice to leave some liferaft for anyone who finds themselves handed an important but abandoned bit of Go software for their organization. |
@carlmjohnson, there are enough differences between modules and the legacy dependency-management tools that a straight conversion often isn't valid anyway (due to unsupported pinning behaviors, or module dependencies that were not seen by the legacy tools, or differences in module vs. package or repo granularity). Generally, |
@carlmjohnson Does your program use dep or godeps or one of those? If not, you won't be affected. If so, try deleting the config file from that versioning tool and see how well the go command fares. My guess is the config is not doing much. If I'm wrong, that'd be good to know. |
It used dep. If you delete the Gopkg.toml and lock files, it doesn't quite build because of a breaking change in go-chi, but that's the only thing holding it back. The import paths are otherwise enough for a build. |
Change https://go.dev/cl/548877 mentions this issue: |
… other vendoring tools This support was removed in CL 518776. For golang#61422. Fixes golang#53327. Change-Id: I8ad0f76aed5f03e32c4c2c5c0001c3f06beb3c7d Reviewed-on: https://go-review.googlesource.com/c/go/+/548877 Reviewed-by: Carlos Amedee <[email protected]> Reviewed-by: Than McIntosh <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
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.
The text was updated successfully, but these errors were encountered: