-
Notifications
You must be signed in to change notification settings - Fork 1k
dep ensure fails on non-git repositories #144
Comments
Oh gooooood, thank you! We definitely need help on the non git(hub) tests. I cover [some of] the basics in gps' tests for bzr and hg, but it's much harder to find good cases in the wild to really put it through its paces. Do you mind replicating this issue over on gps, so we can get it fixed there? |
actually nvm, it's nbd - i'll fix it over there in the morning, then we can just close this out :) |
The main fix here is avoiding creating an empty directory for the destination, as copyDir() doesn't like that. Instead, we create only up to the parent dir. The other bit is ensuring the source repos exist in the cache before attempting to export them, for both bzr and hg. Addresses golang/dep#144
The main fix here is avoiding creating an empty directory for the destination, as copyDir() doesn't like that. Instead, we create only up to the parent dir. The other bit is ensuring the source repos exist in the cache before attempting to export them, for both bzr and hg. Addresses golang/dep#144
The main fix here is avoiding creating an empty directory for the destination, as copyDir() doesn't like that. Instead, we create only up to the parent dir. The other bit is ensuring the source repos exist in the cache before attempting to export them, for both bzr and hg. Addresses golang/dep#144
Taking a bit longer than expected - windows problems. |
Should be fixed now (actually, back when #205 was merged). Do you mind retrying the case that gave you trouble? |
It may be partially fixed, but it still fails during
|
Great, thanks for checking in on it again - I've got a space in which I should be able to poke more seriously at windows testing now, so I should be able to get ahead of this better. |
Oh, also - did you test hg repositories as well, or just bzr? If not, would you mind renaming this issue appropriately? |
I've seen the problem with both hg and bzr, but my test repo only imports one of them. I can track down a package of the other type of add it as a dependency to the test repo. I'll post back here when it is ready. |
I've updated my test repo. It now has two external dependencies, one is hg hosted, the other is bzr hosted. They are imported with _ imports, so there is no actual code needed. The minimal reproducer is: package main
import (
_ "bitbucket.org/zombiezen/gopdf/pdf"
_ "launchpad.net/gocheck"
)
func main() {
} |
OK so...weird. I finally actually tried to reproduce this problem (sorry), and found that I could not on either OSX or linux. And, my original fix for this includes a test that writes out from git, bzr, and hg, and it passes on windows. The fact that it's ensure vs. init shouldn't really matter. But, could you verify that this is still a problem with the latest dep? If so, we can dig in more on replication. |
I just updated dep with The problem bug still occurs on the code I posted above.
|
The main fix here is avoiding creating an empty directory for the destination, as copyDir() doesn't like that. Instead, we create only up to the parent dir. The other bit is ensuring the source repos exist in the cache before attempting to export them, for both bzr and hg. Addresses golang#144
I'm starting to follow up on this issue. I added some debug prints, rebuilt, and ... nothing changed. Hmmm, I got bit by building with So here is the current status, actually building 2c974c5:
|
go version go1.7.3 windows/amd64
Steps to reproduce:
go get github.com/ChrisHines/dep-test
dep init
dep ensure
Expected to see package bitbucket.org/zombiezen/gopdf/pdf in the vendor folder.
Instead I got this error:
Additional hints:
I first encountered this on a bigger (private) project. The error can also occur for packages hosted in Bazaar repos on launchpad.net. Hacking on the dep code to dump out additional info I traced the origin of the error to https://github.com/golang/dep/blob/master/vendor/github.com/sdboyer/gps/util.go#L88 which is called a few stack frames down from https://github.com/golang/dep/blob/master/vendor/github.com/sdboyer/gps/result.go#L51. In short
WriteDepTree
makes the destination directory, but the implementation of interface methodsource.exportVersionTo
for non-git repos callscopyDir
which requires the destination not to exist.The text was updated successfully, but these errors were encountered: