Skip to content

x/tools/gopls: ignore vendor directories when running diagnostics #38080

@stamblerre

Description

@stamblerre

See the end of microsoft/vscode-go#3110 for some discussion. Vendor directories populated after running go mod vendor overwhelm gopls when they create a large number of packages that we consider "part of the workspace".

We need to watch the vendor directory for file changes, but we shouldn't consider packages in vendor directories to be workspace packages, and therefore, we shouldn't offer any diagnostics for them. To me, this seems as simple as ignoring any packages whose directories are prefixed with vendor, but I imagine it's not that simple. @heschik: What do you think / does this approach sound reasonable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions