pote / gpm

Barebones dependency manager for Go.
MIT License
1.19k stars 51 forks source link

Parallel execution of 'go get' may lead to an error #89

Closed philippthun closed 2 years ago

philippthun commented 7 years ago

Running go get in parallel for packages that depend on each other sometimes(?) leads to an error.

Here is an example. I have a Godeps file with the following content:

golang.org/x/oauth2 7fdf09982454086d5570c7db3e11f360194830ca
golang.org/x/net/context 242b6b35177ec3909636b6cf6a47e8c2c6324b5d

When running gpm get, it reports an error:

>> Getting package golang.org/x/oauth2
>> Getting package golang.org/x/net/context
# cd /Users/me/tmp/src/golang.org/x/net; git pull --ff-only
From https://go.googlesource.com/net
 * [new branch]      master     -> origin/master
 * [new branch]      release-branch.go1.6 -> origin/release-branch.go1.6
 * [new branch]      release-branch.go1.7 -> origin/release-branch.go1.7
 * [new branch]      release-branch.go1.8 -> origin/release-branch.go1.8
 * [new branch]      release-branch.go1.9 -> origin/release-branch.go1.9
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> master

package golang.org/x/net/context: exit status 1
>> Failed getting package golang.org/x/oauth2
>> Setting golang.org/x/oauth2 to version 7fdf09982454086d5570c7db3e11f360194830ca
>> Setting golang.org/x/net/context to version 242b6b35177ec3909636b6cf6a47e8c2c6324b5d

When issuing the go getcommands sequentially, no error is reported.