Live data from Hacker News

Problems with Go Get

0x74696d.com

1–10 of 86 posts

Re: Problems with Go Get

#2
What was really difficult for me to wrap my head around was how go dependencies actually work out... via gopath, etc. My first exposure was the bash scripts for a few projects, that I was trying to build in windows... and it was to say an interesting first exposure.

I kind of wish that if go is going to use github targets for dependencies, that they at least support semver pinning and require tagging in github to support this. There are other issues, but I think that would help a lot.

It's always going to be an issue...

----

Of all the developer package managers I've used npm is probably the best... and even that has some issues.

    1. Platform binaries are problematic
    2. Nested hierarchies result in unexpected duplications
    3. Nested hierarchies result in long paths (windows issue).
2, and 3 will be resolved with NPM3, but that brings some interesting breaking changes... beyond that is the fact that npm versions are generally pinned to node/iojs version for most.

1. I'm hoping to see a consistent implementation for tagging modules with binary dependencies, or build dependencies so that there is a build platform in place for at least common targets. Who knows if this will ever happen, and likely will be tied to paid accounts, which isn't exactly a bad thing here.

Re: Problems with Go Get

#4
post #3

We should have python's virtualenv analogue in Go.

I've been using Godeps, which feels like a close equivalent - have a gander and see if it's useful:

https://github.com/tools/godep

Semver support was what got me using godep and I haven't looked back since (at least for larger projects).

Re: Problems with Go Get

#6
would not it be easier and cleaner to use the Android's REPO tool [1] to pin down the versions and layout your workspace? At least the REPO allows you to write down the dependency information in a declarative manner instead of Makefile scripting snippets.

[1] https://source.android.com/source/using-repo.html

Re: Problems with Go Get

#7
Makefiles, build: docker build

Ugh, more Linux-Only. Don't follow this please.

(This isn't necessarily aimed only at blog post, but guys and gals there are other OSs supported by Go than Linux/OSX. Most of the time just having "go get" work is enough. Trust me, I've done it a lot as an outlier. I use FreeBSD and Windows.)

What's wrong with using something like party[1], or nut[2]? Or just vendoring in a way that go build still works. Seriously, what's wrong with more source files in your project's source repository?

This way I can go get your command (package main).

I dunno, maybe I'm just grumpy.

[1] https://github.com/jingweno/nut [2] https://github.com/mjibson/party

Re: Problems with Go Get

#9
I haven't written much go, so I'm just riffing here, but could you do something similar to what the author is suggesting with git submodules?

Re: Problems with Go Get

#10
post #7

Makefiles, build: docker build Ugh, more Linux-Only. Don't follow this please. (This isn't necessarily aimed only at blog post, but guys and gals there are other OSs supported by Go than Linux/OSX. Most of the time just having "go get" work is enough. Trust me, I've done it a lot as an outlier. I use FreeBSD and Windows.) What's wrong with using something like party[1], or nut[2]? Or just vendoring in a way that go b…

GNU make is cross-platform. It's often aliased to "gmake" in Unix-likes that have their own variants of it which predate GNU as the default.

True on Docker, though.

Post reply on HN