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: 'go get' appears to have no way to specify a branch in it that contains a /
#36902
Comments
It's worth noting that there are a lot of people on that issue complaining about this. The skepticism expressed by maintainers that no one does this in the world is completely unwarranted. I've seen people do this at every company I've ever been in, and it is trivially easy to find Go projects on GitHub that actively use this strategy currently. For starters: basically any project that has to keep secrets back from PRs will use this strategy. How can we help to fix this? |
agreed. The original was closed with this comment:
Which was responded to with several dozen downvotes. Even if this is a current heuristic for
|
When you say they don't work — what is the failure mode today? (I would expect those to successfully resolve to a pseudo-version when fetching directly from source control, but not when fetching from a proxy.) |
/
/
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
This issue presents itself as:
A workaround at this time is to EG: |
What further information is needed? Happy to help provide more details to move past the |
@grellyd, please file a new issue. (The issue template has headings and descriptions for all of the needed information.) It would be especially helpful to see how the behavior varies with different settings for |
@bcmills I had a vain hope that commenting would automatically re-open the existing issue. 😂 Oh well. New issue incoming. |
Extracting this bug out of the doc conversation that happened here #30851
Currently
go get
claims to be able to allow you to get a module hosted at a location with a given branch name. i.e.go get github.com/pulumi/pulumi@some_branch
. However, there seems to be no way to make this work if the branch has a/
in it. i.e. neithergo get github.com/pulumi/pulumi@cyrusn/somefix
norgo get github.com/pulumi/pulumi@features/2.0
work.This effectively makes
go get
and modules non-viable for projects that use a very common and legal naming strategy for branches. Note that bothgit
andgithub
are fine with this sort of naming, and it's encouraged in many repos (as it helps keep the list of branches from getting very cluttered).go get
should not arbitrarily restrict the set of branch names it accepts.Workarounds:
You can write
go get ...@deadbeef
. however this only gives you a point-in-time version of the module. There does not seem to be a way to get all the functionality normaly present with a branch-link if the branch contains a/
.The text was updated successfully, but these errors were encountered: