Ran into same issue. Makes it difficult to symlink forks of projects.
A little OT but can't you just add/append it to your GOPATH?
On 16 Sep 2014 04:58, "Stephen Day" <stev...@gmail.com> wrote:
>
> We generally use symlinks into our GOPATHs to support compatibility with existing repo layouts. For example, I have a checkout directory structure that has existed way before we ever used Go. Symlinks are then used from the GOPATH into that directory structure to allow us to build packages with local changes. We could develop everything in GOPATH, but then we'd have to instruct every one to do it the "Go Way", which has varying success. We could reverse it, per James' instruction, but the goal is to make it easier for adoption.
>
> We've only really noticed problems around the usage of godoc.
>
> Could alternative solutions to the approach of ignoring symlinks in the go tool be found to specific problems? IMHO, the go tool shouldn't really have opinions about the underlying structure of the file system.
But it does, its an opinionated tool.
What are the real problems with aliased packages?
>
Aliased packages mean you have two versions of the same source with different names, so you have to independent paths for package I initialisation.
> --
> You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/f5ZYztyHK5I/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Personally I can't think of any meaningfully correct way to use multiple GOPATHs due to this issue.
// [...] If a package p is not in the same tree as any package name on the command-line, assume it is up-to-date [...] it effectively makes each tree listed in $GOPATH a separate compilation world. [...]
if p.Root != "" && !topRoot[p.Root] {