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

Cannot use dep ensure on Windows #805

Closed
sas1024 opened this issue Jul 11, 2017 · 13 comments · Fixed by #940
Closed

Cannot use dep ensure on Windows #805

sas1024 opened this issue Jul 11, 2017 · 13 comments · Fixed by #940
Assignees
Labels

Comments

@sas1024
Copy link

sas1024 commented Jul 11, 2017

What version of Go (go version) and dep (git describe --tags) are you using?

go version go1.8.3 windows/amd64
dep v0.1.0-206-ge99676b

What dep command did you run?

dep ensure -v

What did you expect to see?

Normal working of dep ensure :)

What did you see instead?

An error: both d:\Documents\Projects\Go\src\github.com\sas1024\project and D:\Documents\Projects\Go\src\github.com\sas1024\project are in the same GOPATH d:\Documents\Projects\Go

It's very strange, that's hard drive letter case is differs in paths. There is normal letter and capital letter.

@ibrasho ibrasho added the bug label Jul 15, 2017
@ibrasho
Copy link
Collaborator

ibrasho commented Jul 15, 2017

@sas1024 Thanks for reporting this.

It looks like we are not handling case-insensitive filesystems properly. I'm really interested in how we got two different cases for the same path. 🤔

I have a planned fix for this and some other path-related bugs. I'm just waiting to be sure if it fixes most of the bugs.

@ibrasho ibrasho self-assigned this Jul 15, 2017
@sdboyer
Copy link
Member

sdboyer commented Jul 20, 2017

@sas1024 does this reproduce consistently for you?

@sas1024
Copy link
Author

sas1024 commented Jul 30, 2017

@sdboyer i'm sorry for delay.
Yes, this error reproduced with dep v0.1.0-300-g310c2c8

@sdboyer
Copy link
Member

sdboyer commented Jul 31, 2017

i know we have at least some code that deals with case insensitivity in the volume name correctly, but apparently we don't have all the cases covered :(

@ibrasho
Copy link
Collaborator

ibrasho commented Jul 31, 2017

@sdboyer I believe you mean HasFilepathPrefix.

The comparison in context.go uses ==. Can I use HasFilepathPrefix to check for equality (if the length is the same and one path is a prefix for the other)?

I was planning to add a function to compare paths wrt case-sensitivity depending on the file system... but I'm not sure at the moment if that's the best solution.

@sdboyer
Copy link
Member

sdboyer commented Aug 1, 2017

Can I use HasFilepathPrefix to check for equality (if the length is the same and one path is a prefix for the other)?

Yep, that should work fine.

@sas1024
Copy link
Author

sas1024 commented Aug 19, 2017

Any news, guys?

It reproduced on dep v0.3.0-142-g6ca8a48.
Without fixing this bug for now is not possible to use dep on Windows systems :(

@klauern
Copy link

klauern commented Aug 19, 2017

@sas1024 I think that pull #940 is supposed to fix it, but it hasn't been merged in. I would direct your comment towards that pull request. I believe this issue is blocking for me too, but that is an error on golang tip, so maybe not.

@niondir
Copy link

niondir commented Aug 19, 2017

@sas1024 Just and Idea, a fix could be to change your GOPATH from d:\Documents\Projects\Go to D:\Documents\Projects\Go - does that solve you issue?

@klauern
Copy link

klauern commented Aug 19, 2017

@niondir I think that could fix @sas1024's, issue, but it does seem like it's something that would be discovered in Go 1.9: golang/go@78a11c2

@sas1024
Copy link
Author

sas1024 commented Aug 19, 2017

@niondir in this case i've got this error:
both d:\Documents\Projects\Go\src\github.com\sas1024\project and D:\Documents\Projects\Go\src\github.com\sas1024\project are in the same GOPATH D:\Documents\Projects\Go

@ibrasho
Copy link
Collaborator

ibrasho commented Aug 19, 2017

@sas1024 I'd appreciate it if you could try the code in #940 to ensure it solves the issue.

@sas1024
Copy link
Author

sas1024 commented Aug 19, 2017

@ibrasho with this changes dep works excelent!

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

Successfully merging a pull request may close this issue.

5 participants