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/cmd/gopls: import organization fails in test package #32440

Closed
stamblerre opened this issue Jun 5, 2019 · 3 comments
Closed

x/tools/cmd/gopls: import organization fails in test package #32440

stamblerre opened this issue Jun 5, 2019 · 3 comments

Comments

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jun 5, 2019

Forked from VSCode-Go and Slack discussions: microsoft/vscode-go#2521.

@gopherbot gopherbot added this to the Unreleased milestone Jun 5, 2019
@gopherbot gopherbot added the gopls label Jun 5, 2019
@stamblerre stamblerre added NeedsInvestigation and removed gopls labels Jun 5, 2019
@gopherbot gopherbot added the gopls label Jun 5, 2019
@ramya-rao-a
Copy link

@ramya-rao-a ramya-rao-a commented Jun 5, 2019

@stamblerre, @SteelPhase can either of you add a summary of the slack discussion here?

@heschik
Copy link
Contributor

@heschik heschik commented Jun 5, 2019

Looks like a bug in golang.org/cl/170238: it checks only the directories in play, ignoring the package names. That won't work in the case of an external test that wants to import the package under test. It also won't work in Bazel, where multiple unrelated packages can be in the same directory.

Possible fix would be to check the candidate's import path vs. the file's import path around hereish but I need to think about it more.

@gopherbot
Copy link

@gopherbot gopherbot commented Jun 7, 2019

Change https://golang.org/cl/181338 mentions this issue: internal/imports: suggest x for x_tests

@golang golang locked and limited conversation to collaborators Jun 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.