Skip to content

x/tools/gopls: consider static configuration for multiple builds #65757

Open
@findleyr

Description

@findleyr

This is a follow up to #29202. In that issue, we added dynamic support for tracking multiple GOOS/GOARCH combinations, based on the set of open files. (e.g. if you open foo_windows.go, gopls will create a new View with GOOS=windows).

In some cases, it may be desirable for users to explicitly configure these builds, for example if they know a priori that they are targeting several ports, or sets of build tags. We should consider supporting this, for example via configuration like so:

"builds": [{
  "env": ["GOOS=windows", "GOWORK=off"],
  "flags": ["-tags", "example"]
}, {
  // another build...
}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions