tilezen / tapalcatl

Tapalcatl is a "metatile server", which attempts to serve individual tiles extracted from an archive in storage.
Other
14 stars 3 forks source link

Use dependency management #45

Closed zerebubuth closed 4 years ago

zerebubuth commented 7 years ago

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.

rmarianski commented 7 years ago

Seems like we don't actually have to commit the vendor directory though, and I'd prefer not to.

zerebubuth commented 7 years ago

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?

rmarianski commented 7 years ago

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?

rmarianski commented 7 years ago

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 :)

zerebubuth commented 7 years ago

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:

nvkelso commented 7 years ago

@thisisaaronland can you provide some background on how WOF is go dep'd / vendor'd, please?

thisisaaronland commented 7 years ago

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:

iandees commented 4 years ago

Closing this as I switched to using go modules in #47.