Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's clear to me that Go didn't get package management right,go get doesn't do package management at all. I think today it is the most important thing the go team has to solve.Otherwise, people will end up using different incompatible solutions.

Projects need a manifest so that proper dependencies are declared. People who say "just use make",or "just use git submodule" or "X feature of your VCS" are just pushing for more fragmentation. I download a package.Now I have to check what VCS feature it uses, wether it uses a shell script, make , or build tool Z to fetch dependencies, do people advocating for these solutions really want to use a language where libraries aren't compatible with each others? and then some people say : just vendor and commit dependencies. Ok but let's say I find a bug in one dep. Patching all the different versions of the same dep is just not something manageable.

I think it's time go devs acknowledge the fact that there is an serious issue here, instead of resorting to the ususal "you don't need that in go".

Godeps is a first step, but we need a official way to manage packages.So everybody is on the same line.

I would really like something like composer for Go, with flat dependencies. Which means that, unlikes NPM that downloads the entire world each time one installs a library, dependencies are flat,which keeps API stables and reduce the the amount of useless libraries and forks.



> I think it's time go devs acknowledge the fact that there is an serious issue here, instead of resorting to the ususal "you don't need that in go".

I'm out of the loop, so honest question: does golang-dev still say that? I thought they were not in denial of the problem, but indecisive about the solution. Like with generics? Or do they consider this a non-issue?

I know Cheney recently came out with his own solution, so it can't be that bad, right?


> I know Cheney recently came out with his own solution, so it can't be that bad, right?

Yes, and so have others. What they really need to do is say "this is our blessed solution" and bundle it. Otherwise, there's just a bunch of competing solutions floating around and nothing is really going to take hold.

And yes I'm well aware that Java doesn't have a dependency manager but Maven emerged as the de facto way to handle dependencies. I think that has a lot to do with developer attitudes. I see Go developers as much more "don't tell me what to do, I'll roll my own solution" than Java developers, and that's why I fear a third-party dependency manager won't win out in the Go world.


> now I have to check what VCS feature it uses, wether it uses a shell script, make , or build tool Z to fetch dependencies

The core of my work is on the operations side rather than on development (although I do a good bit of that as well), so my perspective is that this initial overhead is a one-time cost for using a library, and that I can live with that.

> I think it's time go devs acknowledge the fact that there is an serious issue here, instead of resorting to the ususal "you don't need that in go".

Encountering this and a lot of "well this is the way Google does is so we should too" was a big part of what inspired this post.


It's not a one time cost though. Whenever you have options you will have projects jumping and forth between different build tools.

This was a frequent occurence on the JVM platform as libraries moved from Ant to Maven to Gradle over the years.


Seriously. What I'd like from Go is a structure where there's a source directory for my libraries (including external), a directory for the produced binaries (if any), and a text file that describes all my dependencies (including version #s). Inside each library there could be a file that provides the version # of the library.

While building the program, Go should search in my $GOPATH for the specific libraries, and if they're not found, search the libraries included with my package.

Some of the issues they've talked about included, "What happens when you can't `go get` a library because internet dies/repository moved/etc.?", which IMO is a good reason to include the libraries _with_ your Go package.


> What happens when you can't `go get` a library because internet dies/repository moved/etc.

You cache the libraries in a central repository like Nexus or Artifactory and back it up.

This is standard practice in enterprise development where everything is restricted from downloading software except for this particular server.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: