-
Notifications
You must be signed in to change notification settings - Fork 18k
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
go/packages: switch to native overlays for 1.16 #41598
Comments
Change https://golang.org/cl/263985 mentions this issue: |
It's looking like we will need to get the Go version for every call to packages.Load. @heschik: Would it be reasonable to cache the go version in the go command runner, and consequently, enforce a requirement that a given runner can only be used with a single |
There is currently no clear rule about what the lifetime/scope of a Runner is, and it's currently one per gopls session, so that would definitely not be correct given differing environments. We already do multiple go command invocations per Load call (size loading, in particular) and I don't think this is the time to try to reduce them. That said, I think the approach I took in |
It seems easier to have this as a shared internal function. Updates golang/go#41598 Change-Id: If35bdbdf5499624dd55ae9daede1ff1ae9495026 Reviewed-on: https://go-review.googlesource.com/c/tools/+/263985 Trust: Rebecca Stambler <[email protected]> Run-TryBot: Rebecca Stambler <[email protected]> gopls-CI: kokoro <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Peter Weinberger <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]>
Ok, thanks--I wasn't sure if it was OK that we would be adding another |
Change https://golang.org/cl/263984 mentions this issue: |
This change modifies go/packages to use the go command's -overlay flag if used with Go 1.16. It does so by adding a new Overlay field to the gocommand.Invocation struct. go/packages writes out the overlay files as expected by go list before invoking a `go list` command. Fixes golang/go#41598 Change-Id: Iec5edf19ce2936d5a633d076905622c2cf779bcc Reviewed-on: https://go-review.googlesource.com/c/tools/+/263984 Trust: Rebecca Stambler <[email protected]> Run-TryBot: Rebecca Stambler <[email protected]> gopls-CI: kokoro <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]>
#39958 will be part of the 1.16 release. As soon as https://golang.org/cl/253747 is merged, we can start adding a flag to use native Go command overlays in go/packages and begin testing with
gopls
./cc @matloob @heschik @findleyr
The text was updated successfully, but these errors were encountered: