Closed zerebubuth closed 4 years ago
Seems like we don't actually have to commit the vendor directory though, and I'd prefer not to.
As I read it, it's not possible to go get
a binary if the vendor directory isn't committed. This makes it slightly harder to install the package, but perhaps that's an acceptable trade-off for not bloating the repository?
As I read it, it's not possible to go get a binary if the vendor directory isn't committed.
I'm not familiar with the details and haven't read through docs closely, nor have I tried it, but that behavior would be surprising to me. Wouldn't that break backwards compatibility for all existing packages?
I could also have misunderstood you or have been confused about the details here. I suppose we'll see what the behavior is when we try it :)
Ah, yes, you're right. I should have said it's not possible to go get
a binary with versioned dependencies - it'll just use the latest. Which might work - or not :wink:
@thisisaaronland can you provide some background on how WOF is go dep
'd / vendor'd, please?
WOF uses the vendor
directory and Makefiles to manage all this nonsense. There are a variety of dependency "managers" out there that people seem to like (and that do fancy things like version tracking) but since they end up being just another dependency I have opted not to use them.
The two most relevant Make targets are vendor-deps
which purges and refreshes any dependencies (which are fetched using the deps
target) and self
which shuffles source code and dependencies in to the src
directory (which is explicitly ignored in Git) where the compiler expects to find things.
As a consumer of one of these packages the only thing you should be expected to do is type make bin
.
It's not pretty or elegant but it works 99% of the time and I can get on with other things. The remaining 1% involves weirdness like this but so far it's been the exception:
Closing this as I switched to using go modules in #47.
The currently fashionable way to do this is go dep. This means vendoring in the dependencies so that the tagged repo is self-contained (other than the Go compiler and runtime). This does annoyingly bloat the repo, but there doesn't seem to be much we can do about that.