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: special case for chiselapp.com interferes with '.fossil' extension #31014
Comments
Are you sure that the repository can be cloned in general? If so, what command did you use to verify that, and in what way (if any) does it differ from the How does the behavior change, if at all, in module mode (with |
@arnottcr you need to supply the path to the repository with out the .fossil extension:
|
@kamanson: I am aware that the clone works without the @bcmills: while the output is not identical, modules appear to preserve the failing behaviour:
|
@arnottcr can you point to
Chisel can handle redirects however it wants, same as any other code host. It doesn't work with git either:
Can you point me to the spec you are referring to? |
I'm guessing the section in https://tip.golang.org/cmd/go/#hdr-Remote_import_paths starting at “For code hosted on other servers […]”. But note that that is an either/or, not both: in general we expect each repository to have one canonical path, not multiple variations. You should import via only that canonical path. |
Yeah, that was the paragraph I was citing as spec, but my reading was that the package/module owner had the choice of either option, not the entire hosting provider. So if a vcs suffix was provided, it would trump the http/meta driven resolution. I guess I do not see the benefit of preventing a package/module owner from using 0] This rule only applies for GitHub and JazzHub, and leverages get.noVCSSuffix. |
go/src/cmd/go/internal/get/vcs.go Lines 1023 to 1029 in df557fe
We should probably try to migrate all of those special cases over to |
sgtm; would you mind if I worked on a patch, or is there a larger refactor in the works that would nullify such efforts? (e.g. modules) |
If you add the .fossil extension, fossil itself fails with the redirect error:
Click...redirect with status 302 to http://chiselapp.com/notfound redirect with status 301 to http://chiselapp.com/notfound/xfer/xfer/ redirect with status 301 to http://chiselapp.com/notfound/xfer/xfer/xfer/xfer/ redirect with status 301 to http://chiselapp.com/notfound/xfer/xfer/xfer/xfer/xfer/xfer/ redirect with status 301 to http://chiselapp.com/notfound/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/ redirect with status 301 to http://chiselapp.com/notfound/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/ redirect with status 301 to http://chiselapp.com/notfound/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/ redirect with status 301 to http://chiselapp.com/notfound/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/ redirect with status 301 to http://chiselapp.com/notfound/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/ redirect with status 301 to http://chiselapp.com/notfound/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/ redirect with status 301 to http://chiselapp.com/notfound/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/ redirect with status 301 to http://chiselapp.com/notfound/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/ redirect with status 301 to http://chiselapp.com/notfound/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/ redirect with status 301 to http://chiselapp.com/notfound/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/ redirect with status 301 to http://chiselapp.com/notfound/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/ redirect with status 301 to http://chiselapp.com/notfound/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/ redirect with status 301 to http://chiselapp.com/notfound/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/ redirect with status 301 to http://chiselapp.com/notfound/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/ redirect with status 301 to http://chiselapp.com/notfound/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/xfer/
I don't understand how this can be fixed. Would we drop the .fossil extension? This seems like even more of a special case to me. Fossil itself is hosted at https://fossil-scm.org/, which can't have an extension. |
@arnottcr, I think that deprecating any (or all) of the In particular, we would need buy-in from folks who currently maintain or use those hosting services, since either they would need to add the |
I'd like to take a step back, though: what's the concrete problem you're trying to address using the |
I was looking into I do not have a workflow that is broken by this issue, and realistically it would probably be more useful to implement gddo support as a provider/special case like github or bitbucket, since chisel has somewhat standard APIs. I was not aware when I opened this ticket that 0] I think this is because fossil is intended as a github in a binary, so most people run their own, however I was trying to find something official. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I tried to clone a fossil repo from chiselapp using the
.fossil
to test self-hosted fossil repos. It looks like thechiselapp.com/user/kyle/repository/fossilgg
format is handled separately incmd/go/internal/get/vcs.go
.What did you expect to see?
The
go get
succeeds and documentation can be listed viago doc
for confirmation:What did you see instead?
The
fossil clone
fails:This also leaves behind an empty
fossilgg.fossil
directory in$GOPATH
that has the side effect of preventing future calls togo get
:$ go get chiselapp.com/user/kyle/repository/fossilgg.fossil can't load package: package chiselapp.com/user/kyle/repository/fossilgg.fossil: no Go files in /home/user/go/src/chiselapp.com/user/kyle/repository/fossilgg.fossil
The text was updated successfully, but these errors were encountered: