tools / godep

dependency tool for go
http://godoc.org/github.com/tools/godep
BSD 3-Clause "New" or "Revised" License
5.55k stars 455 forks source link

godep save not working #515

Closed dhawal55 closed 7 years ago

dhawal55 commented 7 years ago

Expected behavior

godep save should pull all dependencies and save them in vendor folder go build works correctly so all dependencies are present in GOPATH

Actual behavior

When i run godep save, i get error for missing dependencies

godep save
godep: Package (golang.org/x/net/lex/httplex) not found

Steps to reproduce behavior

rm -rf Godeps
rm -rf vendor
go build # This works and binary is created
godep save

godep version output

godep v74 (darwin/amd64/go1.6.2)

go version output

go version go1.6.2 darwin/amd64

Contents of Godeps.json file

empty

freeformz commented 7 years ago

go get golang.org/x/net/lex/httplex and try again.

On Thu, Sep 15, 2016 at 10:10 AM dhawal55 notifications@github.com wrote:

Expected behavior

godep save should pull all dependencies and save them in vendor folder go build works correctly so all dependencies are present in GOPATH Actual behavior

When i run godep save, i get error for missing dependencies

godep save godep: Package (golang.org/x/net/lex/httplex) not found

Steps to reproduce behavior

rm -rf Godeps rm -rf vendor go build # This works and binary is created godep save

godep version output

godep v74 (darwin/amd64/go1.6.2) go version output

go version go1.6.2 darwin/amd64 Contents of Godeps.json file

empty

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tools/godep/issues/515, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAAZwZkOXdecvs5M1yDskpDTaw4hU3fks5qqXwGgaJpZM4J-HDv .

dhawal55 commented 7 years ago

I tried that and then it fails on next dependency. Isn't godep save supposed to vendor all dependencies? Are these godep dependencies because i'm able to build my app correctly?

On Sep 15, 2016 3:56 PM, "Edward Muller" notifications@github.com wrote:

go get golang.org/x/net/lex/httplex http://golang.org/x/net/lex/httplex and try again.

On Thu, Sep 15, 2016 at 10:10 AM dhawal55 notifications@github.com wrote:

Expected behavior

godep save should pull all dependencies and save them in vendor folder go build works correctly so all dependencies are present in GOPATH Actual behavior

When i run godep save, i get error for missing dependencies

godep save godep: Package (golang.org/x/net/lex/httplex) not found

Steps to reproduce behavior

rm -rf Godeps rm -rf vendor go build # This works and binary is created godep save

godep version output

godep v74 (darwin/amd64/go1.6.2) go version output

go version go1.6.2 darwin/amd64 Contents of Godeps.json file

empty

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tools/godep/issues/515, or mute the thread https://github.com/notifications/unsubscribe-auth/ AAAAZwZkOXdecvs5M1yDskpDTaw4hU3fks5qqXwGgaJpZM4J-HDv .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tools/godep/issues/515#issuecomment-247477699, or mute the thread https://github.com/notifications/unsubscribe-auth/ADUqlbNb_DBu3OHp79YoJKsvCUNR8KXlks5qqc0BgaJpZM4J-HDv .

freeformz commented 7 years ago

They are probably additional transitive deps that godep picks up that go build does not consider because godep includes all deps across all build tags. This is so that people can develop on one OS and build on another. I would suggest giving govendor a try, which has an additional ignore field in it's vendor.json file that can tweak this. I'm not sure if I'm going to be doing much work to enhance godep anymore because there is work (which I'm involved in) ongoing for an official package management tool.

On Thu, Sep 15, 2016 at 6:05 PM dhawal55 notifications@github.com wrote:

I tried that and then it fails on next dependency. Isn't godep save supposed to vendor all dependencies? Are these godep dependencies because i'm able to build my app correctly?

On Sep 15, 2016 3:56 PM, "Edward Muller" notifications@github.com wrote:

go get golang.org/x/net/lex/httplex http://golang.org/x/net/lex/httplex http://golang.org/x/net/lex/httplex and try again.

On Thu, Sep 15, 2016 at 10:10 AM dhawal55 notifications@github.com wrote:

Expected behavior

godep save should pull all dependencies and save them in vendor folder go build works correctly so all dependencies are present in GOPATH Actual behavior

When i run godep save, i get error for missing dependencies

godep save godep: Package (golang.org/x/net/lex/httplex) not found

Steps to reproduce behavior

rm -rf Godeps rm -rf vendor go build # This works and binary is created godep save

godep version output

godep v74 (darwin/amd64/go1.6.2) go version output

go version go1.6.2 darwin/amd64 Contents of Godeps.json file

empty

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tools/godep/issues/515, or mute the thread https://github.com/notifications/unsubscribe-auth/ AAAAZwZkOXdecvs5M1yDskpDTaw4hU3fks5qqXwGgaJpZM4J-HDv .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tools/godep/issues/515#issuecomment-247477699, or mute the thread < https://github.com/notifications/unsubscribe-auth/ADUqlbNb_DBu3OHp79YoJKsvCUNR8KXlks5qqc0BgaJpZM4J-HDv

.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/tools/godep/issues/515#issuecomment-247495305, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAAZwpsKrObKRMp8syzi8iIZk8701rjks5qqetEgaJpZM4J-HDv .

MikeSpreitzer commented 7 years ago

Closed? There was no assent that the originator had his problem solved. BTW, this looks a lot like #517 The work-around posted there and here is not working for me.

cassioconti commented 6 years ago

Try a godep restore first. For me, after that the godep save started working.