Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upLibraries and gb #20
Comments
davecheney
referenced this issue
May 1, 2015
Closed
Add a summary of the differences with standard go tool #23
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
nathany
May 6, 2015
Flattening the vendor/ folder of a library to that of the end-of-line project vendor/ folder seems easy enough.
The challenge is conflicts. With DVCS there would be a three-way merge and conflict resolution, but if the history is removed when vendoring, what then? (other than fail with an error)
nathany
commented
May 6, 2015
|
Flattening the vendor/ folder of a library to that of the end-of-line project vendor/ folder seems easy enough. The challenge is conflicts. With DVCS there would be a three-way merge and conflict resolution, but if the history is removed when vendoring, what then? (other than fail with an error) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
davecheney
May 6, 2015
Contributor
Flattening the vendor/ folder of a library to that of the end-of-line project vendor/ folder seems easy enough.
I believe this to be out of scope for gb for the time being (maybe it's implemented in a plugin, but that is also out of scope).
This is for two reasons.
The first is gb tries to avoid boiling all the oceans at once and tackles the problem of how to provide reliable builds by providing a project based workflow; a single repository that contains all the source (neatly divided into yours, src/, and theirs vendor/src) but remains mute on the way that this project is constructed.
The most obvious way to build a gb project is to copy all of the dependencies your project requires into vendor/src/ and then check the whole shebang in. More ambitious users may attempt to use svn externals or git subthingies to automate this process.
The challenge is conflicts. With DVCS there would be a three-way merge and conflict resolution, but if the history is removed when vendoring, what then? (other than fail with an error)
I view this problem as insoluable with the tools available to us today. @peterbourgon astutely noted that the Go dependency problem is one of space; the package's import path, and time; the specific revision or copy of a package at a point in time.
Go packages do not have versions, at least not in the way that ruby gems have versions, or npm packages have versions, etc. The source of Go packages may be backed by a DVCS and you may be able to ask that DVCS for different revisions of a package, representing a set of changes over time. This may appear to be splitting hairs, but I think it is a crucial distinction.
The problem of managing the diamond dependency problem is, for the moment, entirely the domain of the project owner. gb provides a vessel to hold the source of their project, but remains mute on how or what source is selected to be placed inside a project.
In the future, maybe a plugin can manage the specific source inside vendor/src/, but it is not within the current scope of what I am planning to achieve.
I believe this to be out of scope for This is for two reasons. The first is The most obvious way to build a
I view this problem as insoluable with the tools available to us today. @peterbourgon astutely noted that the Go dependency problem is one of space; the package's import path, and time; the specific revision or copy of a package at a point in time. Go packages do not have versions, at least not in the way that ruby gems have versions, or npm packages have versions, etc. The source of Go packages may be backed by a DVCS and you may be able to ask that DVCS for different revisions of a package, representing a set of changes over time. This may appear to be splitting hairs, but I think it is a crucial distinction. The problem of managing the diamond dependency problem is, for the moment, entirely the domain of the project owner. In the future, maybe a plugin can manage the specific source inside |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
davecheney
May 6, 2015
Contributor
@elithrar can I ask a clarifying question. I originally thought that this was a request to use gb for packages, that is libraries that don't contain a main package, effectively anything which is not defined as a gb project today. Is this the case, or is this a different request ?
|
@elithrar can I ask a clarifying question. I originally thought that this was a request to use |
davecheney
added
the
enhancement
label
May 6, 2015
davecheney
referenced this issue
May 6, 2015
Open
[RFC] Adding support for creating gb projects that don't contain main packages #49
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
elithrar
May 6, 2015
@davecheney Nope, you're right: a request to use this for libraries — i.e. other than just the package main support we have today.
The suggestions are potential ways to implement it (and/or things to consider) but I'm certainly open to other ideas for library support.
elithrar
commented
May 6, 2015
|
@davecheney Nope, you're right: a request to use this for libraries — i.e. other than just the The suggestions are potential ways to implement it (and/or things to consider) but I'm certainly open to other ideas for library support. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
elithrar
May 6, 2015
@davecheney I think you covered it pretty succinctly in #49 actually—so happy to close this one.
elithrar
commented
May 6, 2015
|
@davecheney I think you covered it pretty succinctly in #49 actually—so happy to close this one. |
elithrar commentedApr 29, 2015
Providing functionality to support library authors (vendoring deps) and library users (building with those deps) would be very useful, and would cover part of the use-case that
tools/godepdoes without the import path re-writing.go get github.com/you/yourpackageand pull down the master.gb buildto use the vendored packages under/vendorinstead of their global GOPATHgo buildandgo installand build off their global GOPATH. This (obviously) may not work, but we can't change the behaviour of go get. This is no different from how things work now with go get and pulling deps from head..gbvendorsfile (the name is unimportant right now!) as well that makes it clear what revisions were pulled in. Avoiding submodules/subtrees is great (IMO) but knowing what revision the vendored dependency is pinned at still has value.My library would then look like: