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

Open
cannahum opened this issue Mar 11, 2021 · 1 comment
Open

x/tools/gopls: go.mod errors only in experimental workspace module mode #44932

cannahum opened this issue Mar 11, 2021 · 1 comment
Labels
Milestone

Comments

@cannahum
Copy link

@cannahum cannahum commented Mar 11, 2021

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

@stamblerre stamblerre commented Mar 11, 2021

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 this to the Unreleased milestone Mar 11, 2021
@stamblerre stamblerre modified the milestones: Unreleased, gopls/v0.6.8 Mar 11, 2021
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