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: go.mod errors only in experimental workspace module mode #44932

Closed
cannahum opened this issue Mar 11, 2021 · 2 comments
Closed
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@cannahum
Copy link

What version of Go, VS Code & VS Code Go extension are you using?

  • Run go version to get version of Go from the VS Code integrated terminal.
    • go version go1.16 darwin/amd64
  • Run gopls -v version to get version of Gopls from the VS Code integrated terminal.
    • fish: Unknown command: gopls ( :) how do you all get the gopls version)
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders.
    • 1.54.1
  • Check your installed extensions to get the version of the VS Code Go extension
    • v0.23.0
  • Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > Go: Locate Configured Go Tools command.
    • (nothing while I'm on this error state)

Share the Go related settings you have added/edited

{
  "settingsSync.ignoredSettings": [
        "-go.gopath",
        "-go.toolsGopath",
        "-git.path"
    ],
    "gopls": {
        "build.experimentalWorkspaceModule": true
    },
    "go.coverOnSave": true,
    "go.coverageDecorator": {
        "type": "gutter"
    }
}

Run Preferences: Open Settings (JSON) command to open your settings.json file.
Share all the settings with the go. or ["go"] or gopls prefixes.

Describe the bug

This may be related to golang/vscode-go#1283
My issue is more about why this is happening. Maybe gopls is a better place to open this issue.

I have a dependency: github.com/awslabs/aws-lambda-go-api-proxy
That has a dependency: github.com/kataras/iris/v12 v12.1.8
And that has a dependency: golang.org/x/text v0.3.2
But, I don't want to use golang.org/x/text v0.3.2 since it has a known issue as you can see here

When I build and run from the terminal, there is no issue. When I use GoLand, there doesn't seem to be an issue there either; however, when I open the project on VS Code, I get error messages such as:
go.sum is out of sync with go.mod. Please update it by applying the quick fix.go list

and the only solutions I get (which don't work) are exactly the same offered on golang/vscode-go#1283

Steps to reproduce the behavior:

  1. Clone the repo I created from here
  2. Open VS Code
  3. See go.mod

Screenshots or recordings

If applicable, add screenshots or recordings to help explain your problem.
Screen Shot 2021-03-10 at 5 03 19 PM

@stamblerre
Copy link
Contributor

Thank you for reporting this issue. Looks like it only reproduces in experimentalWorkspaceModule mode. I'll transfer this to the gopls issue tracker for further investigation.

@stamblerre stamblerre transferred this issue from golang/vscode-go Mar 11, 2021
@stamblerre stamblerre changed the title gopls: packages.Load error dependency issue x/tools/gopls: go.mod errors only in experimental workspace module mode Mar 11, 2021
@gopherbot gopherbot added gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. labels Mar 11, 2021
@gopherbot gopherbot added this to the Unreleased milestone Mar 11, 2021
@stamblerre stamblerre modified the milestones: Unreleased, gopls/v0.6.8 Mar 11, 2021
@stamblerre stamblerre added this to P1 in gopls on-deck Apr 15, 2021
@stamblerre stamblerre moved this from P1 to To Do in gopls on-deck Apr 15, 2021
@gopherbot
Copy link

Change https://golang.org/cl/317449 mentions this issue: internal/lsp: handle exclude directives in multi-module mode

@stamblerre stamblerre modified the milestones: gopls/v1.0.0, gopls/v0.6.12 May 6, 2021
gopls on-deck automation moved this from To Do to Done May 6, 2021
@golang golang locked and limited conversation to collaborators May 6, 2022
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. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
No open projects
Development

No branches or pull requests

3 participants