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/gopls: failures when switching from GOPATH to modules #37069

Open
stamblerre opened this issue Feb 5, 2020 · 1 comment
Open

x/tools/gopls: failures when switching from GOPATH to modules #37069

stamblerre opened this issue Feb 5, 2020 · 1 comment

Comments

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Feb 5, 2020

Reported by @tbpg (please correct me if I'm mistaken here).

Repro steps:

  1. Open a package that was previously set up to work in GOPATH mode.
  2. Initialize a module.
  3. There is a missing dependency - add it to the go.mod.
  4. Errors about the missing dependency do not go away.
@gopherbot gopherbot added this to the Unreleased milestone Feb 5, 2020
@stamblerre stamblerre modified the milestones: Unreleased, gopls/v0.4.0 Feb 5, 2020
@tbpg

This comment has been minimized.

Copy link
Contributor

@tbpg tbpg commented Feb 6, 2020

The missing dependency was a package within the project.

Kind of like this:

.
├── bar
│   └── bar.go
└── foo.go # imported myproject/bar

When I opened foo.go, there was an error about not being able to find myproject/bar. So, I did go mod init example.com/myproject then changed the import to example.com/myproject/bar.

Then I still got the error that myproject/bar was not found (not an error about example.com/myproject/bar)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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