-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
packer: 0.7.5 -> 0.8.6 #12533
packer: 0.7.5 -> 0.8.6 #12533
Conversation
Would it not be easier to move this into the go-packages.nix ecosystem, rather than bundling custom dependencies for everything? cc @wkennington We already have several other hashicorp things in there, including consul and vault. |
I don't know. The more packages we add, the harder it's going to be to find a common set of working repositories. My guts tells me that we should rather follow the ruby approach and have a set of dependencies per project. In this case for example the version of aws-sdk-go that packer uses is more recent than the one in go-packages because they have changed some of the interfaces. What seem to be happening with the other hashicorp projects is that they add a Godeps/Godeps.json file that lists the whole set of dependencies with the exact revision. We can easily transform that into a nix expression. Bug report is also going to be easier if we use the same versions as everyone. |
I've created https://github.com/kamilchm/go2nix PoC some time ago, but I don't have time to polish it up.
|
It looks really nice to generate the nix dependency list. |
I'll try to use
But I don't know when I'll find some time for it :( |
Isn't this the same set of points that applies anywhere though? You could say the same about the python ecosystem or any of the other ones we package. There are pros and cons to the two approaches but my usual fear is that you then lose out on fixes to libraries. For example assume one thing needed extensive patching to work under Nix, then any project depending on it now needs to figure out the issues every time, rather than once. Same with security updates to dependencies. In short, doing the ruby thing feels kind of un-distro-like to me.
|
Like, I recognize the downsides to that point as well (equivalence to the outside world and entanglement) but what I mean by "un-distro-like" is that giving every package its own unique set of dependencies feels like a bit of a cop-out. Distributions are usually about picking canonical versions that they know work and don't have security issues and so on. If we start autogenerating those things, let's say someone finds a security bug in |
You're making a good point. I don't even trust Hashicorp. Not because they are bad developers but because the go community doesn't have any releases or tooling to actively track security issues. The fallback is to read all the new commits on all of the 54 dependencies of this project which is not something really reasonable to do. As a packager, ideally I would be able to depend on a fixed set of package akin to Haskell's LTS, and only diverge when necessary (eg: depend on an unreleased feature, bugfix, ...). And have the tooling to support that with a way to consolidate the diversions in future LTS releases. Right now because each Go developer has it's own GOPATH with a different set of checked-out revisions we are going to run into more conflicts that with Haskell where (probably) most developers test their package against a set of LTS releases (and get feedback from the LTS guys when compilation fails). Also because most packages aren't released with versioning, developers tend to break APIs without thinking too much about it. Also because of the missing versioning the best guess to select a commit is to take any commit that's younger than the parent project. Sorry of being negative, I'm still feeling the pain of taking 2 hours to update this dependency set. Once I'll have recovered I will have another go at it and here is what I propose: |
@zimbatm yeah, sure. TBC, it's not as if I'll veto the merge if you don't even want to do what you're saying. Given that it's already doing all the custom versioning and you're bumping it up to a newer one, I'd probably be fine with a small note saying "TODO: figure out how to do this more nicely and refer to #12533 for more discussion" or something. I really just want a good answer for this sort of thing going forward, and am hoping someone comes up with clever ways to get the best of both worlds 😄 |
It's worth to mention golang/go#12302 and golang/go#13517 |
I agree with @copumpkin that this should be consolidated into |
It took me 2 hours to package this thing.
First I cribbed the homebrew package dependencies. Wrote a little script for that.
Then I had 5 iterations with missing dependencies, trying to find the right version of the amazon SDK and such.
It compiles on OSX but that's as far as I've tested it for now.