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

x/tools/go/loader: handle relative imports #9117

Closed
adonovan opened this issue Nov 17, 2014 · 2 comments
Closed

x/tools/go/loader: handle relative imports #9117

adonovan opened this issue Nov 17, 2014 · 2 comments

Comments

@adonovan
Copy link
Member

Currently go/loader looks for packages relative to $GOPATH and $GOROOT but it should
also allow paths relative to the current directory such as ./foo, and do so in a manner
consistent with the 'go' tool.

This is a subtle change because the name supplied by the user (./foo) may not match the
canonical import path ("bar/foo") that is widely used as a map key, so we'll
need to audit and test the code thoroughly.

Do this after the 1.4 tree thaw.
@ianlancetaylor
Copy link
Contributor

Comment 1:

Labels changed: added repo-tools, release-none.

@bradfitz bradfitz removed the new label Dec 18, 2014
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc removed the release-none label Apr 10, 2015
@rsc rsc changed the title golang.org/x/tools/go/loader: handle relative imports x/tools/go/loader: handle relative imports Apr 14, 2015
@rsc rsc modified the milestones: Unreleased, Unplanned Apr 14, 2015
@rsc rsc removed the repo-tools label Apr 14, 2015
@alandonovan
Copy link
Contributor

Fixed along with vendoring changes.

@golang golang locked and limited conversation to collaborators Feb 28, 2017
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