1
0
mirror of https://github.com/golang/go synced 2024-10-01 10:38:33 -06:00
Commit Graph

9 Commits

Author SHA1 Message Date
Ian Cottrell
cf0cb92717 internal/telemetry: renaming to internal/event
internal/telemetry/event was renamed to internal/event/core
Some things were partly moved from internal/telemetry/event straight to
internal/event to minimize churn in the following restructuring.

Change-Id: I8511241c68d2d05f64c52dbe04748086dd325158
Reviewed-on: https://go-review.googlesource.com/c/tools/+/229237
Run-TryBot: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2020-04-23 17:20:48 +00:00
Rob Findley
3d37a67796 internal/gocommand: clean up docstring typos and staticcheck errors
Fix a couple typos in the RunRaw docstring, as well as some superficial
staticcheck errors.

Change-Id: I557d7ee63366b2b3a82d590d69ee2907d4e3ac59
Reviewed-on: https://go-review.googlesource.com/c/tools/+/229417
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2020-04-22 17:07:37 +00:00
Rohan Challa
46bd65c853 internal/lsp/cache: add concurrency error check for go cmds
This change attempts to fix a concurrency error that would cause
textDocument/CodeLens, textDocument/Formatting, textDocument/DocumentLink,
and textDocument/Hover from failing on go.mod files.

The issue was that the go command would return a potential concurrency
error since the ModHandle and the ModTidyHandle are both using the
temporary go.mod file.

Updates golang/go#37824

Change-Id: I6cd63c1f75817c7308e033aec473966536a2a3bd
Reviewed-on: https://go-review.googlesource.com/c/tools/+/224917
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-04-08 03:22:09 +00:00
Rebecca Stambler
f8bfb4ee30 internal/gocommand: fix environment on Windows
Seems like os.Environ() is necessary after all. My bad for not testing
my earlier change on Windows. I'm not able to reproduce the behavior
in my test, so it's not really testing the crash correctly.

Fixes golang/go#38062

Change-Id: Ied45bbf572023a9dcd5d020db49bf3e95c824602
Reviewed-on: https://go-review.googlesource.com/c/tools/+/226370
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2020-03-30 18:31:14 +00:00
Rebecca Stambler
3db5fc6bac internal/gocommand: don't delete command's environment
My fix in CL 225817 introduced another bug :)

Fixes golang/go#38101

Change-Id: I3de1a051d3e86474c6aa0fb0e427a590438e2172
Reviewed-on: https://go-review.googlesource.com/c/tools/+/226257
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2020-03-28 03:18:15 +00:00
Rebecca Stambler
8faa90c243 internal/gocommand: only set working dir if it's not empty
This was causing crashes by setting the working directory to be empty.

Fixes golang/go#38062
Fixes golang/go#38101

Change-Id: I6d679ee1d5dcab914df3d565d83aa6de0dd74cb4
Reviewed-on: https://go-review.googlesource.com/c/tools/+/225817
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2020-03-27 19:39:47 +00:00
Marwan Sulaiman
63da46f303 x/tools/gopls: run go generate through CodeLens
This change adds support for recognizing a //go:generate directive
and offering a CodeLens that will then send a "generate" command to
the server to run "go generate" or "go generate ./...". Because
"go generate" can only be executed per package, there is no need to show
the CodeLens on top of every //go:generate comment. Therefore, only the
top directive will be considered.

The stdout/stderr of the go generate command will be piped to the logger
while stderr will also be sent to the editor as a window/showMessage

The user will only know when the process starts and when it ends so that they wouldn't
get bogged with a large number of message windows popping up. However, they can
check the logs for all the details.

If a user wants to cancel the "go generate" command, they will be able
to do so with a "Cancel" ActionItem that the server will offer to the client

Fixes golang/go#37680

Change-Id: I89a9617521eab20859cb2215db133f34fda856c7
Reviewed-on: https://go-review.googlesource.com/c/tools/+/222247
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-03-17 04:34:34 +00:00
Heschi Kreinick
7c03e3340d internal/gocommand: kill gracefully
We want the go command to get a chance to do its cleanups. Send it
Interrupt before Kill.

Fixes golang/go#37368.

Change-Id: Id891d2f4f85aae30d2aaa19b9c854d2346ec6e1f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/220738
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-02-25 21:33:51 +00:00
Heschi Kreinick
c5cec6710e all: consolidate invokeGo implementations
Over time we have accumulated a disturbing number of ways to run the Go
command, each of which supported slightly different features and
workarounds. Combine all of them.

This unavoidably introduces some changes in debug logging behavior; I
think we should try to fix them incrementally and consistently.

Updates golang/go#37368.

Change-Id: I664ca8685bf247a226be3cb807789c2fcddf233d
Reviewed-on: https://go-review.googlesource.com/c/tools/+/220737
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-02-25 21:33:46 +00:00