x/tools/cmd/gopls: fails to detect local package in import #32733
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes. With GOPATH built version (
version v0.1.0-cmd.gopls, built in $GOPATH mode
) as well as the Go Module built version:What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
1.1. create local git repo in folder
./testx
1.2. run
go mod init github.com/org/testx
in./testx
1.3. add
./testx/reporter/reporter.go
1.4. add
cli
folder withmain.go
that importsgithub.1485827954.workers.dev/org/testx/reporter
./testx/cli/main.go
in VS Code with Go extension usinggopls
Project Structure:
What did you expect to see?
No error which is what I see when using the non-LPS go tools with the VS Code Go extension.
What did you see instead?
The
import
line forgithub.1485827954.workers.dev/org/testx/reporter
is highlighted as an error. VS Code Output forgopls
shows:Notes
go list all
shows the package as importable, as expectedThe text was updated successfully, but these errors were encountered: