Thanks for the replies! I would like to actually vendor the dependencies to 
ensure repeatable builds (so I want to avoid submodules).

In a perfect world, I would like to be able to use the go toolchain (not 
abandon go-get quite yet). I have been able to hack together some 
client-side git hooks which accomplish this: 
https://github.com/nstogner/gomono. After installing them in the client 
repo, the gophers should be able to proceed along without worrying about 
how they use go-get... Let me know what you think.


On Saturday, November 12, 2016 at 12:00:08 PM UTC-5, Nick Stogner wrote:
>
> I would like to version control my entire GOPATH to store all of my go 
> code in a monolithic repository. (see http://danluu.com/monorepo/ or 
> https://blog.gopheracademy.com/advent-2015/go-in-a-monorepo/)
>
> The problem that I run into: how to manage dependencies with "go get" ?.. 
> I would like to vendor these dependencies but git wants to treat them as 
> nested repos and doesn't end up vendoring them on commit to the parent repo.
>
> I have tried: moving nested ".git" directories to ".git-moved", etc. This 
> works for vendoring go-gotten repos but is a hassle and also messes up 
> future calls to go get:
>
> $ mv   src/github.com/Sirupsen/logrus/.git   src/github.com/Sirupsen/
> logrus/.git-moved
> $ git add --all; git commit -m 'this commit vendors the logrus package'
> $ go get -u github.com/Sirupsen/logrus
> package github.com/Sirupsen/logrus: directory "/tmp/monorepo/src/
> github.com/Sirupsen/logrus" is not using a known version control system
>
> I would have to mv those .git-moved directories back to .git before using 
> go-get again and this would be a pain and not scalable to a team.
>
> Has anyone come up with a solution for this?
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to