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

Do not error out when the current directory is a symlink #684

Closed
mildred opened this issue May 31, 2017 · 2 comments
Closed

Do not error out when the current directory is a symlink #684

mildred opened this issue May 31, 2017 · 2 comments

Comments

@mildred
Copy link

mildred commented May 31, 2017

Here, we generate an error that is not necessary :

dep/context.go

Line 215 in 5f1783b

return "", errors.Errorf("'%s' is linked to another path within a GOPATH (%s)", path, gp)

There are cases where a repository cannot be cloned in the correct location inside the GOPATH as described in golang/go#20535. In such cases, a solution is to generate a mock gopath with a symlink at the correct gopath location to the repository checkout directory. We arrive at a perfectly valid setup where the current directory, although a symlink, is inside the GOPATH. There is no reason to error out in such cases.

This is probably the same thing as #683

@sdboyer
Copy link
Member

sdboyer commented May 31, 2017

hi! welcome, thanks for posting the issues 😄

There is no reason to error out in such cases.

The error you're identifying is for the specific situation where there's a symlink from one GOPATH, into another GOPATH. It doesn't seem like that's your actual issue, though (I'm not entirely clear from either this issue or the golang/go one you posted); if all you want to do is symlink into a GOPATH, then that is something we aim to support, but we regressed and lost that capability somewhere along the way. #641 should fix it.

If your goal is GOPATH-to-GOPATH symlinking, though, then that's not something we plan to support. It adds complexity and ambiguity, and would serve very little purpose outside of one-time hinting to dep init - a very narrow use case.

@ibrasho
Copy link
Collaborator

ibrasho commented Jun 17, 2017

Closing this since #641 is merged now.

@ibrasho ibrasho closed this as completed Jun 17, 2017
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

3 participants