go/internal/lsp/debug
Hana 6aaba7740f internal/lsp/debug: add go version to gopls version output
Add -json flag to output in JSON format.

Include the Go version info
  - go1.18: runtime/debug.BuildInfo.GoVersion
  - pre go1.18: runtime.Version

Restructure ServiceVersion so we embed info from
runtime/debug.BuildInfo. Instead of directly using
runtime/debug.BuildInfo, we use our own BuildInfo type.
That allows:
  for go1.17 or older versions, we can add GoVersion.
  for go1.18, we can drop MarshalText that prevents
  JSON encoding other languages and human can understand
  (golang/go#51026)

For golang/go#49783

Change-Id: Ia5ab50ce1f5e6c3a912654834785ecea7f5034e2
Reviewed-on: https://go-review.googlesource.com/c/tools/+/382274
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2022-02-07 15:39:03 +00:00
..
log internal/lsp/debug: hook runtime/trace into event spans 2020-12-11 18:50:31 +00:00
tag internal/lsp/debug: add a facility to track known bugs 2021-05-10 23:21:19 +00:00
buildinfo_go1.12.go internal/lsp/debug: add go version to gopls version output 2022-02-07 15:39:03 +00:00
buildinfo_go1.18.go internal/lsp/debug: add go version to gopls version output 2022-02-07 15:39:03 +00:00
info.go internal/lsp/debug: add go version to gopls version output 2022-02-07 15:39:03 +00:00
info_test.go internal/lsp/debug: add go version to gopls version output 2022-02-07 15:39:03 +00:00
metrics.go internal/event: move event/core.Tag to event/label.Label 2020-04-23 18:13:33 +00:00
rpc.go gopls/test: add type checking for debug server templates 2020-12-22 16:32:15 +00:00
serve.go internal/lsp/debug: improve readability of session options 2021-09-28 20:53:23 +00:00
trace.go gopls/test: add type checking for debug server templates 2020-12-22 16:32:15 +00:00