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
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@stamblerre
Copy link
Contributor

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 Issues related to the Go language server, gopls. label Jun 5, 2019
@stamblerre stamblerre added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. and removed gopls Issues related to the Go language server, gopls. labels Jun 5, 2019
@gopherbot gopherbot added the gopls Issues related to the Go language server, gopls. label Jun 5, 2019
@ramya-rao-a
Copy link

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

@heschi
Copy link
Contributor

heschi 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

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.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants