-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: legacy dependency conversion bypasses GOPROXY #33767
Comments
Change https://golang.org/cl/191218 mentions this issue: |
modfetch.ImportRepoRev
Go 1.13 is well into the release freeze at this point, so we're pretty much only fixing critical regressions from here on out. The good news is, the tree will be opening for 1.14 very soon. |
And this problem isn't just for |
Hi @bcmills, someone has reported this bug to me (again) today. This bug isn't only triggered when So, please merge https://golang.org/cl/191218 and consider applying those changes to Go 1.13.1 (or 1.13.2). We really need it. 🙏 Thanks again. ❤️ |
CL 191218 is in, although I don't think it meets the backport criteria (it wasn't a regression and the workaround is to run Regarding other operations that might generate a |
Alright, I got it. Thank you for your reply. :-) |
The reason for the test failure seems to be that some of the converted formats specify package paths rather than module paths, and The usual function that converts a package path to a module path is The circular dependency exists because
Role (2) will need significant refactoring for #26904 anyway, so I'm planning to revisit this once that has been addressed. CC @jayconrod |
I don't think I'll have time to get to that in 1.14 after all. 😞 |
This will still make sense for people under firewall(AKA MOSTLY Chinese Gopher) , can we put it in Go1.17 or other recent releases , thanks. Create the empty go.mod file and run |
@scbizu Sorry, I almost forgot this one, thanks for the ping. I just checked the code, and I'll submit a CL later. |
Change https://golang.org/cl/306809 mentions this issue: |
I find out that maybe the way create |
Well, one of my friends (@eddycjy) tried to migrate a project from their company from golang/dep to Go modules. When he executes
go mod init example.com/foo/bar
,go
parses theGopkg.lock
file, which causes the initialization to fail because the endpoints of some of the modules inGopkg.lock
are blocked by their company's firewall. We thought the firewall problem could be solved by settingGOPROXY
until I foundmodfetch.ImportRepoRev
:go/src/cmd/go/internal/modfetch/repo.go
Lines 282 to 327 in 2b8b34a
I also found that
modfetch.ImportRepoRev
first appeared in the golang/vgo@97ff4ad submitted by @rsc. And the reason is:I investigated it as much as I can. Then I think the "inappropriate" that @rsc said before may have gone now, since
modload.Query
is now very powerful. So I added support for the module proxy formodfetch.ImportRepoRev
by simply doing something likemodload.Query
.I just submitted a patch. If the patch can be merged, then I suggest applying those changes to Go 1.13 since it has not yet been released. 😊
The text was updated successfully, but these errors were encountered: