Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Unable to use dep inside Bash for Windows #1136

Closed
julien10 opened this issue Sep 7, 2017 · 5 comments
Closed

Unable to use dep inside Bash for Windows #1136

julien10 opened this issue Sep 7, 2017 · 5 comments

Comments

@julien10
Copy link

julien10 commented Sep 7, 2017

Hello,

I'm having trouble using dep ensure inside of the Bash for Windows.

What version of dep are you using (dep version)?

v0.3.0-250-g062d2d0

What dep command did you run?

dep ensure

What did you expect to see?

all my dependencies synced

What did you see instead?

dep ensure
grouped write of manifest, lock and vendor: cannot delete /tmp/dep056793704/vendor: remove /tmp/dep056793704/vendor/golang.org/x/sys/unix: directory not empty

or

dep ensure
grouped write of manifest, lock and vendor: error while writing out vendor tree: failed to write dep tree

Thanks a lot

@colek42
Copy link

colek42 commented Sep 7, 2017

ref: #1114

@CyrusNajmabadi
Copy link

I also ran into this issue today. A colleague spelunked a bit and found a likely culprit. Namely that TMPDIR points to /tmp which is on a different mountpoint in WSL versus my home directory.

What this means is that during dep ensure there is a step where renaming a directory happens. Because of the cross device locations, this happens as a full copy with a delete. The delete the fails (for reasons that we're not 100% sure of). We think it might be because something has a handle open to a file (perhaps because directory enumeration is happening).

We worked around this issue by setting TMPDIR to ~/tmp

@CyrusNajmabadi
Copy link

Note: this seems to be a manifestation of golang/go#20841 Namely that os.RemoveAll ends up failing, which then causes fs.renameByCopy to fail.

@mmdriley
Copy link

That issue bottoms out at microsoft/WSL#2077 (comment). According to that issue this is fixed in the Fall Creator's Update.

@redbaron
Copy link

@julien10 , I am using it with Bash on Windows successfully , you need to subscribe to Insiders Preview builds in your update settings to make it work or wait for Fall Creator's Update.

Either way, there is nothing dep can do about it, so this issue can be closed to improve stats :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants