Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrites broken in symlinked directories #19

Open
parkan opened this issue Dec 2, 2016 · 3 comments
Open

Rewrites broken in symlinked directories #19

parkan opened this issue Dec 2, 2016 · 3 comments

Comments

@parkan
Copy link

parkan commented Dec 2, 2016

I like to symlink dirs out of GOPATH and into my normal working tree, however this seems to silently break gx-go rewrites.

The offending line appears to be here: https://github.com/whyrusleeping/gx-go/blob/master/rewrite/rewrite.go#L33

@whyrusleeping
Copy link
Owner

Hrm... Can you provide me a quick example of your setup? like, what your GOPATH is and where your symlinks are? i'll try to reproduce the issue and fix it

@ghost
Copy link

ghost commented Dec 3, 2016

@parkan independent of this particular issue, I've been symlinking from gopath to workspace in the past as well, but now I symlink the other way around, I have all of the ipfs/libp2p/ipld/multiformats repos in my workspace, and symlink the ipfs/etc. dirs into gopath/src/github.com, which works nicely.

@parkan
Copy link
Author

parkan commented Dec 5, 2016

[mine]% ls -ld concat
lrwxr-xr-x  1 arkadiy  staff  50 Oct 12 15:31 concat -> /Users/arkadiy/go/src/github.com/mediachain/concat
[mine]% pwd
/Users/arkadiy/mine
[mine]% cd concat
[master//concat]% gx-go rewrite                                            
# nothing happens
[master//concat]% echo $GOPATH
/Users/arkadiy/go
[mine]% cd $GOPATH/src/github.com/mediachain/concat                                       
[master//concat]% gx-go rewrite
# works

I'll try symlinking the other way around

timotree3 added a commit to timotree3/gx-go that referenced this issue Jun 16, 2017
`gx.GetPackageRoot()` uses `os.Getwd()`, but unlike the cwd variable,
it doesn't use `filepath.EvalSymlinks`.

Now it's output is fed to `filepath.EvalSymlinks` to fix the problem
occuring in whyrusleeping#19.
timotree3 added a commit to timotree3/gx-go that referenced this issue Jun 16, 2017
`gx.GetPackageRoot()` uses `os.Getwd()`, but unlike the cwd variable,
it doesn't use `filepath.EvalSymlinks`.

Now it's output is fed to `filepath.EvalSymlinks` to fix the problem
occuring in whyrusleeping#19.
timotree3 added a commit to timotree3/gx-go that referenced this issue Jun 16, 2017
`gx.GetPackageRoot()` uses `os.Getwd()`, but unlike the cwd variable,
it doesn't use `filepath.EvalSymlinks`.

Now it's output is fed to `filepath.EvalSymlinks` to fix the problem
occuring in whyrusleeping#19.
@timotree3 timotree3 mentioned this issue Jun 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants