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

cmd/go: Symlinks in gopath break change detection in go run #6162

Closed
anacrolix opened this issue Aug 16, 2013 · 3 comments
Closed

cmd/go: Symlinks in gopath break change detection in go run #6162

anacrolix opened this issue Aug 16, 2013 · 3 comments
Milestone

Comments

@anacrolix
Copy link
Contributor

When using go run against code outside the gopath, that's symlinked to from the gopath,
go run fails to detect changes in dependences.

symlink $GOPATH/src/meh -> $HOME/meh

"meh" depends on "dep", located at $GOPATH/src/dep

go run $HOME/meh/*.go does not rebuild "dep" if "dep" has changed.

go version devel +e99621daceb3 Thu Aug 15 16:42:54 2013 +1000 linux/amd64
@adg
Copy link
Contributor

adg commented Aug 16, 2013

Comment 1:

The symlink seems like a distraction.
Are you saying that "dep" is not re-installed? Or that it is considered up-to-date and
the old package object is used, even though "dep" has changed?

@robpike
Copy link
Contributor

robpike commented Aug 17, 2013

Comment 2:

The entire build suite uses Stat, not Lstat, so I agree with adg that the symlink detail
is likely irrelevant. I also verified by experiment that touching a dependent file that
is behind a symlink is still detected by the go command as a changed dependency.
In other words, I reproduced the structure as you described it and it worked fine. We
need more information.

Status changed to WaitingForReply.

@ianlancetaylor
Copy link
Contributor

Comment 3:

No reply, so closing.  Please reopen if this is still a problem and you can provide more
information.

Status changed to Invalid.

@rsc rsc added this to the Go1.2 milestone Apr 14, 2015
@rsc rsc removed the go1.2maybe label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants