-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: accept git commit hash or tag in go get #21933
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
How exacly would this syntax work with multiple packages, while still keeping backwards compatibility? Also note that such a large change should come in the form of a proposal with much more detail. |
Well, as in case of other languages - if you are specifying exact thing to get - it's your problem that it does not work. I personally know many people who are using additional tools/dirty hacks to get this functionality. Adding the naive matching is better that nothing in such scenario. Sorry, this is my first work with golang codebase, I'll look up how to create proposals in more formal way. |
If you want to specific version, you should use https://github.com/golang/dep instead |
I don't see how. Doing |
By parsing if the repo is followed by commit hash. No hash - no change in
behavior. If hash is present - checkout onto it.
…On Sep 19, 2017 3:32 PM, "Daniel Martí" ***@***.***> wrote:
Adding the naive matching is better that nothing in such scenario.
I don't see how. Doing go get foo.com/foo bar.com/bar means one thing
currently and is completely unambiguous. How do you propose to keep
backwards compatibility with that while adding the versions like you showed?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#21933 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACRlBW-ioY_0zFGV7036y-cEnzPMWcOYks5sj8KEgaJpZM4PcUDe>
.
|
Perhaps I'm missing something very obvious, but it seems to me like the syntax is still ambiguous. In the original post you mentioned tags as well as hashes. How are you going to discern if a string is a tag or an import path? Note that both can be |
or you can use git submodules. |
The lack of this ability make impossible to install older version without becoming crazy. My use case: i need to install https://github.com/google/cloud-print-connector BTW totally ok to support commit hash only if that is the issue. Somethng is way better than nothing |
@MauroMombelli This issue is closed, for good reasons. There are some alternatives suggested above. Another is to run |
@MauroMombelli if you don't feel like using |
@ianlancetaylor is not checking out the correct version, is to make it complile with all dependency and such. I bring as example the https://github.com/google/cloud-print-connector, a official google product that break and i wanted to have. @OneOfOne i would like to use it, but i tried some combinantion of parameter before giving up in frustration. I understand the "compile by yourself", but the "handle the dependency fun".. no thank you. I tryed to use another tool that supposely would give you a specific tag, but unfortunately it seems to use a different versioning schema that the project liked, thus making the build unsuccessfully. |
@MauroMombelli This issue is closed and will not be reopened. If you want to discuss this further, please use a forum; see https://golang.org/wiki/Questions. Thanks. |
Again, this issue is closed - please use one of the forums mentioned by @ianlancetaylor above to continue the discussion, or open a new issue if you have a specific proposal or suggestion in mind. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?1.9
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?linux/amd64
What did you do?
go get github.com/organization/repo
What did you expect to see?
Ability to install specific version of the repo is needed.
go get in
go/src/cmd/go/internal/get/vcs.go
Line 147 in 178307c
git pull
.git checkout
should be added afterwards to optionally checkout onto the commit provided in the following fashion:go get github.com/organization/repo commithash123456789
go get github.com/organization/repo v1.2.1
The text was updated successfully, but these errors were encountered: