-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: running get on a custom repo no longer works when upgrading to go 1.8.3 #20731
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
Comments
We're currently frozen and wrapping up Go 1.9. If this was broken through the whole Go 1.8 cycle, it can probably wait until Go 1.10. /cc @rsc though in case he has time to investigate. |
What does |
I am going to assume you mean
|
@rsc Is there anything else you need from me? It would be really awesome if a fix didn't have to wait till go 1.10. |
The relevant parts of the go command docs read:
The problem here is that the <meta> tag being served does not name a Subversion repository root. Subversion is different from Git and Mercurial (and like CVS) in that you can check out a subtree, and it appears that that's what is being directed here. This is not really supported, at least according to the docs. Whether we should support it, since it mostly works, is a different question. It looks like perhaps we should change the go/src/cmd/go/internal/get/vcs.go from looking for I'm a bit reluctant to make a change at this point in the Go 1.9 cycle, but maybe it's OK if we can establish that (1) all recent subversions do print URL lines, and (2) if you do check out the repository root instead of a subdirectory, the URL and Repository Root lines say the same thing. |
@rsc Making changes to vcs.go worked. Here is what i did.
(1) I have svn version 1.7.21 and 1.8.14 and they both print out the URL. Contents of issue-20731.patch --- vcs.go.old 2017-06-21 14:06:15.166391000 -0500
+++ vcs.go.new 2017-06-21 14:22:56.566029000 -0500
@@ -299,14 +299,14 @@
// Expect:
// ...
- // Repository Root: <URL>
+ // URL: <URL>
// ...
- i := strings.Index(out, "\nRepository Root: ")
+ i := strings.Index(out, "\nURL: ")
if i < 0 {
return "", fmt.Errorf("unable to parse output of svn info")
}
- out = out[i+len("\nRepository Root: "):]
+ out = out[i+len("\nURL: "):]
i = strings.Index(out, "\n")
if i < 0 {
return "", fmt.Errorf("unable to parse output of svn info") |
CL https://golang.org/cl/46417 mentions this issue. |
@rsc I see that a patch has been committed. Will this end up making go 1.9? |
Yes (unless a problem is discovered with it and it's rolled back). |
Ok, thanks. |
I ran the following with custom urls.
go get -u -d customurl.com/lib/platform/genlog
get -u -d customurl.com/ext/daemon-example
This worked with go 1.7.4 and fails with go 1.8.3.
With go 1.8.3, the first command works, but the second command fails with the following error.
Error: Get Failed: package customurl.com/lib/platform/genlog: customurl.com/lib/platform/genlog is a custom import path for https://mysvnrepo.com/PIM/golang/customurl.com/lib/platform/genlog/trunk, but /gopath/src/customurl.com/lib/platform/genlog is checked out from https://mysvnrepo.com/PIM
The package is actually downloaded though.
When doing a
svn info https://mysvnrepo.com/PIM/golang/customurl.com/lib/platform/genlog/trunk
I get the following.
I am guessing that the commit 17ad60b broke it.
/cc @rsc
The text was updated successfully, but these errors were encountered: