tools / godep

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

godep v77 breaks with "is not using a known version control system" #531

Closed stevenh closed 7 years ago

stevenh commented 7 years ago

Expected behaviour

godep save ./... should work

Actual behaviour

godep: error while inspecting "/data/go/src/github.com": directory "/data/go/src/github.com" is not using a known version control system

Please note that the actual package directories are using known version control systems (git) but the intermediate directories are obviously not part of any repo.

Steps to reproduce behaviour

run godep save ./... with a directory in the GOPATH that isn't part of a known version control system.

This works fine in v74 and v76.

godep version output

godep v77 (freebsd/amd64/go1.7.4

go version output

go version go1.7.4 freebsd/amd64

freeformz commented 7 years ago

It may be huge, but can you provide the output of godep save -d -v ./... &> output ?

xrl commented 7 years ago

@freeformz I have a similar issue. I'm new to the kubernetes project (as well as godep). Here's what I got: https://gist.github.com/xrl/080e18909538e9d748eb87cd5d58c7ae . Downgrading to v74 got me going again.

freeformz commented 7 years ago

It looks like the change to stop using build.ImportDir in the code that handles './...' and the like is returning stuff above the current directory. There probably aren't tests for that specific issue, but I expected the existing tests to cover them. I'll have to dig more to figure out why.

AlmogBaku commented 7 years ago

same here

turtlemonvh commented 7 years ago

Temporary solution

go get gopkg.in/tools/godep.v76 && \cp $GOPATH/bin/godep.v76 $GOPATH/bin/godep
freeformz commented 7 years ago

Fixed. Sorry about that. Silly mistake. :-(