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: consider static configuration for multiple builds #65757

Open
findleyr opened this issue Feb 16, 2024 · 0 comments
Open

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

findleyr opened this issue Feb 16, 2024 · 0 comments
Labels
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

@findleyr
Copy link
Contributor

findleyr commented Feb 16, 2024

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...
}]
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Feb 16, 2024
@gopherbot gopherbot added this to the Unreleased milestone Feb 16, 2024
@findleyr findleyr modified the milestones: Unreleased, gopls/v0.16.0 Feb 16, 2024
@findleyr findleyr modified the milestones: gopls/v0.16.0, gopls/v0.17.0 Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

2 participants