You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've seen many projects being worked on to support vendoring in go projects, as well as the official go "vendor" directory experiment.
All of these solutions require that the project using them keep a copy of all dependencies within their repository, and all of them seem rather complicated.
I feel that this could be a lot more simple if the go get tool supported checking out specific changesets. That way you could simply have a "manifest" file (similar to Godeps.json) in your repo like this:
Then all a management tool would need to do is run:
go get github.com/dependency/one 1a1a1a1a1a1a1a1a1a1a
go get github.com/dependency/two 2b2b2b2b2b2b2b2b2b2b
go get github.com/dependency/three v0.2.1
And then the builder will have the dependencies checked out in their regular GOPATH, no need to vendor all of the source code within their repository.
Once the correct changesets are checked out, the builder does not have to worry about using any outside tools to build their project, just the standard go tools.
This was inspired by how Android projects manage their dependencies: http://developer.android.com/guide/topics/manifest/manifest-intro.html. In android projects, repositories contain no dependencies other than the manifest.xml file, which simply identifies the repos and changesets to check out.
To me, this seems like a natural thing for go get to do, since currently the two options are either: (1) checkout HEAD/tip (go get -u), or (2) checkout without paying attention to the revision (go get).
The text was updated successfully, but these errors were encountered:
sparrc
changed the title
Support checking out specific commit hash/revision/changeset with go get
proposal: Support checking out specific commit hash/revision/changeset with go getDec 4, 2015
sparrc
changed the title
proposal: Support checking out specific commit hash/revision/changeset with go get
proposal: Support checking out a changeset with go getDec 4, 2015
sparrc
changed the title
proposal: Support checking out a changeset with go get
proposal: Support checking out a commit with go getDec 4, 2015
This is part of the greater dependency management story, and I think any change will be much bigger in scope than this specific proposal. In that light, I am declining this proposal. If you disagree with my decision please let me know. Thanks for your time.
I've seen many projects being worked on to support vendoring in go projects, as well as the official go "vendor" directory experiment.
All of these solutions require that the project using them keep a copy of all dependencies within their repository, and all of them seem rather complicated.
I feel that this could be a lot more simple if the
go get
tool supported checking out specific changesets. That way you could simply have a "manifest" file (similar to Godeps.json) in your repo like this:Then all a management tool would need to do is run:
And then the builder will have the dependencies checked out in their regular GOPATH, no need to vendor all of the source code within their repository.
Once the correct changesets are checked out, the builder does not have to worry about using any outside tools to build their project, just the standard go tools.
This was inspired by how Android projects manage their dependencies: http://developer.android.com/guide/topics/manifest/manifest-intro.html. In android projects, repositories contain no dependencies other than the manifest.xml file, which simply identifies the repos and changesets to check out.
To me, this seems like a natural thing for
go get
to do, since currently the two options are either: (1) checkout HEAD/tip (go get -u), or (2) checkout without paying attention to the revision (go get).The text was updated successfully, but these errors were encountered: