(Replying to PARENT post)

Brad is keeping a copy of all 3rd party libraries in https://github.com/bradfitz/camlistore/tree/master/third_par...

Is this the approach you recommend? Iโ€™ve never built a large go project, so Iโ€™m eager to learn what the best practices are.

๐Ÿ‘คiampims๐Ÿ•‘12y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

I would not use Camlistore as an example for typical Go best-practices. Aside from the fact that >30% of the project (by Github's estimation) is written in various other languages, the opening comment on the Makefile reads, "The rest of this Makefile is mostly historical and should hopefully disappear over time."

Also, GP is conflating the issues of (1) fetching dependencies, (2) building a project, (3) installing the project. Makefiles aren't inherently evidence against "go get"; there is no reason that "go get" couldn't call "make" instead of "go build" (which it does).

The main reason that (almost) no pure Go projects have Makefiles anymore[0] is because they're frankly not needed. The standard Go build tools[1] are more than sufficient.

Don't take my word for it, though. Hop on #go-nuts on freenode and ask the guys there (many of whom are core contributors) what they think of Makefiles. They'll tell you the same thing that they told me over a year ago when I tried to advocate the use of Makefiles in pure Go projects.

[0] For what it's worth, before Go 1.0 came out, projects had Makefiles. The fact that Makefiles were a part of the standard build process and later removed should be a hint as to what the idiomatic Go approach is considered to be.

[1] "go get" isn't exactly a build tool in this sense; it's a convenience wrapper for cloning using git/hg/etc., followed by "go build" and "go install"

๐Ÿ‘คchimeracoder๐Ÿ•‘12y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

Yes, that's what I recommend. I don't recommend a Makefile for a pure Go project, you really just need a shell script that sets GOPATH and calls "go build". That's what we do and it works well.
๐Ÿ‘คjff๐Ÿ•‘12y๐Ÿ”ผ0๐Ÿ—จ๏ธ0