Граф коммитов

42 Коммитов

Автор SHA1 Сообщение Дата
Daniel Martí 4f21f7a508 gopls: update gofumpt to v0.3.0
Also add a TODO inside the format.Options expression,
as we are not currently wiring up some information from the main go.mod.
The TODO comment contains a summary of what should be done.

Change-Id: Ibace6c36de4b729b5ba8b347f6f48f0a8fda695e
Reviewed-on: https://go-review.googlesource.com/c/tools/+/387374
Trust: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Robert Findley <rfindley@google.com>
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-02-23 14:43:16 +00:00
Robert Findley 77f5fa5142 internal/lsp/cache: replace old go.work parser with x/mod
Gopls was using an old version of workfile support in x/mod that did not
support the 'use' syntax.

Upgrade to x/mod@master, and update tests accordingly.

For golang/go#44696

Change-Id: I87841cd1322d7b1aa0fbc929838746ea600bee77
Reviewed-on: https://go-review.googlesource.com/c/tools/+/382078
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-02-04 14:01:19 +00:00
Robert Findley 263785d774 gopls: update dependencies post-release
This breaks the build at Go 1.12, as documented in golang/go#50827.

Fixes golang/go#50827

Change-Id: Ic7c122757e53981c5ee8f7fdf74fe276895717f2
Reviewed-on: https://go-review.googlesource.com/c/tools/+/380555
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2022-01-31 22:10:16 +00:00
Jonathan Amsterdam 8d383106f7 gopls/doc: use improved code generator for API doc
Use github.com/jba/printsrc in place of github.com/sanity-io/litter to
generate the Go code with API documentation. It is smart enough
to elide type names, making the "massive hack" of deleting them
unnecessary. It also omits zero values from the output.

Change-Id: Ic1bb937b9a3695e6da6db72b74c6049be1c5b80d
Reviewed-on: https://go-review.googlesource.com/c/tools/+/370840
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2021-12-16 11:15:33 +00:00
Rebecca Stambler 96266072c4 all: update dependencies post-release
Change-Id: I1c48c94a133b6543a26a1803220c5c0fbbcc821e
Reviewed-on: https://go-review.googlesource.com/c/tools/+/357035
Trust: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-10-26 18:40:06 +00:00
Rebecca Stambler bf6c7f26e9 all: update dependencies after gopls/v0.7.1 release
Change-Id: Ifd3227e2c34798024820277b512f18768e125c38
Reviewed-on: https://go-review.googlesource.com/c/tools/+/341809
Trust: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-08-18 17:22:40 +00:00
Dominik Honnef b95d58a81b gopls/internal/hooks: update for Staticcheck 2021.1
Change-Id: I3b10339b4049453cd3d9393df79c333c1e4f7c82
Reviewed-on: https://go-review.googlesource.com/c/tools/+/322490
Trust: Dominik Honnef <dominik@honnef.co>
Run-TryBot: Dominik Honnef <dominik@honnef.co>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2021-05-25 18:39:40 +00:00
Rebecca Stambler 9cddb0ea22 all: update all dependencies except for sergi/go-diff and golang.org/x/net
Post-release dependency upgrade.

Change-Id: Icee97a77e003cb875f38fb04daab148bfb01c131
Reviewed-on: https://go-review.googlesource.com/c/tools/+/317692
Trust: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
2021-05-11 14:29:16 +00:00
Bryan C. Mills a1fbb68135 all: upgrade go.mod files to Go 1.16
This enables the narrower "all" pattern described in
https://golang.org/doc/go1.16#all-pattern,
eliminating some otherwise-unnecessary checksums.

For golang/go#36460.

Change-Id: Ia894b1c1d85f8d1317aebb816921e95e7c1da506
Reviewed-on: https://go-review.googlesource.com/c/tools/+/315569
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
2021-05-03 18:12:08 +00:00
pjw fe1c5480f5 gopls/test: it is safe to ignore json unmarshalling errors
This test checks that if a single value in the Initialize message
changes, the resulting unmarshalled struct changes in no more than
one place. The implication is that ignoring UnmarshalTypeErrors
in LSP processing is safer than causing a fatal error, which is the
current state.

Change-Id: I64bbf6f785c32fa7483966a117ac3b6f11d573be
Reviewed-on: https://go-review.googlesource.com/c/tools/+/310109
Run-TryBot: Peter Weinberger <pjw@google.com>
Trust: Peter Weinberger <pjw@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-04-27 12:58:28 +00:00
Rebecca Stambler ec686a2a72 all: upgrade all dependencies except for go-diff
https://github.com/sergi/go-diff/issues/115 prevents us from upgrading
go-diff in gopls.

Change-Id: I19aa01aa201b894a537480500ea435f2951a3082
Reviewed-on: https://go-review.googlesource.com/c/tools/+/308829
Trust: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-04-09 16:31:56 +00:00
Koichi Shiraishi 52cb77242b gopls: upgrade mvdan.cc/gofumpt to v0.1.1
$ go mod edit -require=mvdan.cc/gofumpt@latest
$ rm -f go.sum; go1.16.2 mod tidy -v

Change-Id: Iaa724ae26f0f5082ec433004ea9da11ca047c740
Reviewed-on: https://go-review.googlesource.com/c/tools/+/303849
Trust: Rebecca Stambler <rstambler@golang.org>
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2021-03-24 18:15:38 +00:00
Koichi Shiraishi a1191f373a gopls: upgrade honnef.co/go/tools to v0.1.3
$ go mod edit -require=honnef.co/go/tools@latest
$ rm -f go.sum; go1.16.2 mod tidy -v

Change-Id: Id1fb0373334ada1daf8fb5b6c488bf2dfea055fe
Reviewed-on: https://go-review.googlesource.com/c/tools/+/303850
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Trust: Rebecca Stambler <rstambler@golang.org>
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
2021-03-24 17:17:31 +00:00
Rebecca Stambler ed97357570 all: upgrade all dependencies, if possible
Change-Id: Ifce11f6d94b1c6b4231abffd848cf45a10c962df
Reviewed-on: https://go-review.googlesource.com/c/tools/+/288733
gopls-CI: kokoro <noreply+kokoro@google.com>
Trust: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2021-02-03 19:28:29 +00:00
Roland Shoemaker fe37c9e135 all: replace all usages of os/exec with golang.org/x/sys/execabs
This change ensures that packages using exec.LookPath or
exec.Command to find or run binaries do not accidentally run
programs from the current directory when they mean to run programs
from the system PATH instead.

Change-Id: I5907aa630ff64012395a7eb472967a477d90f12e
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/949438
Reviewed-by: Katie Hockman <katiehockman@google.com>
Reviewed-by: Russ Cox <rsc@google.com>
Reviewed-on: https://go-review.googlesource.com/c/tools/+/284773
Run-TryBot: Roland Shoemaker <roland@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Roland Shoemaker <roland@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2021-01-19 22:25:03 +00:00
Daniel Martí 961d08dc12 gopls: bump gofumpt to v0.1.0
Largely no functional changes, but it's the first tagged release and it
has a few bug fixes compared to the previous version from September.

It pulls in new versions of x/mod and even x/tools itself, which is
amusing.

Change-Id: I9b889a162af14d75aa5ca2f448a29b18a555f572
Reviewed-on: https://go-review.googlesource.com/c/tools/+/280315
Trust: Daniel Martí <mvdan@mvdan.cc>
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2021-01-05 16:30:49 +00:00
Rebecca Stambler 3fa0e8f87c gopls: disable TestTemplate on Android
The test doesn't pass on Android, likely because of the use of
go/packages.

Change-Id: If31ea39e9dfbbb1dc0d9c123a43384cb552cd025
Reviewed-on: https://go-review.googlesource.com/c/tools/+/279712
Trust: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
Reviewed-by: Peter Weinberger <pjw@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
2020-12-23 01:07:50 +00:00
Peter Weinbergr f2e330f490 gopls/test: add type checking for debug server templates
When internal data structures in gopls changed, the templates driving
the debug server failed because fields or methods they relied on
had gone away. At some cost, this change adds tests that all the
fields and methods in the templates can be satisfied.

The test assumes that all the template uses are through render() in
debug/serve.go. It checks that is list of templates is the same
as the server's, and then type checks each template.

The costs are
1. the template type checking is done by a new external dependency,
github.com/jba/templatecheck
2. To avoid adding a new dependency to x/tools, the test is in
the gopls module, not the debug package, so variables from the
debug package have to be exported

In an ideal world the debug package, and much of internal/lsp,
would be in the gopls package. In that case the cost 2 about could
be avoided.

In an ideal world, the core runtime template packages would
contain template checking code, and cost 1 would be unnecessary.
In a more likely (or not so distant) world, perhaps jba would move
(or allow us to move) the template check package into x/tools.

Change-Id: I36b509a00cbdcb5323ee1af3c1193b603c7a907f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/277292
Run-TryBot: Peter Weinberger <pjw@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Trust: Peter Weinberger <pjw@google.com>
2020-12-22 16:32:15 +00:00
Heschi Kreinick a1a1cbeaa5 gopls/doc: generate JSON too, store as composite literal
Combine the generation of the API json with the generation of the
documentation. This cuts out a step from the generation process, and
allows us to depend on third-party modules. Use litter to print a
composite literal instead of JSON text, which will diff and merge much
better.

The only real drawback is that you have to "go run" from the gopls
module to avoid adding the extra deps to tools.

Sorry about the copy and paste; there's relatively little actual code
change, just a bit in doMain and rewriteAPI.

Change-Id: Iac936d31b7e52651b3b33f27497cfdbd133f1e76
Reviewed-on: https://go-review.googlesource.com/c/tools/+/274373
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2020-12-03 20:21:02 +00:00
Rebecca Stambler 9cf592e881 all: update all dependencies to latest pseudoversions
Change-Id: If1b583e7d776eae605ba361baa8f1879dba03465
Reviewed-on: https://go-review.googlesource.com/c/tools/+/264207
Trust: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2020-10-22 03:59:29 +00:00
Rebecca Stambler 5a2aa26beb all: update dependencies in tools and gopls modules
Change-Id: I6fe2ad991f509e9d13e4aee3042a58953680a779
Reviewed-on: https://go-review.googlesource.com/c/tools/+/251820
Reviewed-by: Robert Findley <rfindley@google.com>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-08-31 20:39:04 +00:00
Rebecca Stambler 62a0bb781d gopls, internal/lsp: support an extra formatting hook for gofumpt
This change reworks CL 240118 to apply gofumpt directly as a formatter,
not an analyzer. Depending on how gofumpt changes, we may be able to use
it as an analyzer in the future, but for now it's just easier to add it
as a formatting hook.

Fixes golang/go#39805

Change-Id: I227fde4b1916d8a82557f30dfca88e155136dff5
Reviewed-on: https://go-review.googlesource.com/c/tools/+/241985
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2020-07-13 21:42:47 +00:00
Rebecca Stambler 682c4542fd all: update dependencies in go.mod file
CL 226639 changed the positions of the go.mod diagnostics (in a
negligible way), but the tests are quite brittle and can't handle the
different position. Rewrite this test as a regression test to handle it.

The special // indirect marker can be removed from the go/expect package
as a result, since it was only used in this one place.

Change-Id: I7d9a62e32e53d477838e65673635ed231c07b659
Reviewed-on: https://go-review.googlesource.com/c/tools/+/240691
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2020-07-06 23:19:48 +00:00
Rebecca Stambler 8018eb2c26 gopls: update dependencies in the go.mod
Change-Id: Iaf3f9d9d23f3977138978caac800c67c78bc92bd
Reviewed-on: https://go-review.googlesource.com/c/tools/+/234338
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2020-05-18 20:39:08 +00:00
Bryan C. Mills ac2e956812 go.mod: upgrade goldmark dependency to fix js/wasm build
For golang/go#38183
Updates yuin/goldmark#120

Change-Id: I913c3409fe0c774209ce046a85699ef845e7c7b3
Reviewed-on: https://go-review.googlesource.com/c/tools/+/226560
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
2020-03-31 19:25:49 +00:00
Koichi Shiraishi bd88ce9755 gopls: update github.com/sergi/go-diff to v1.1.0
Change-Id: I522b49dfe7e2437bbf76fa58baa66b29aee8e28a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/223497
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-03-16 18:21:29 +00:00
Russ Cox 8ac058ed9f present: accept Markdown in present files
Markdown is enabled by starting the title with "# ".
See the new documentation in present/doc.go for details.

For golang/go#33955.

Change-Id: I04ef2aa2cf253bdf48910c5674d679a482ffa33f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/222846
Reviewed-by: Rob Pike <r@golang.org>
2020-03-13 20:55:25 +00:00
Rebecca Stambler 658b03bcd3 all: upgrade outdated dependencies
Used Rohan's new code lens feature to upgrade some of our outdated
dependencies.

Change-Id: Ifddd5c00f36e5a7e32aca3113e03cd3caeb4cdb9
Reviewed-on: https://go-review.googlesource.com/c/tools/+/221102
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
2020-03-03 20:20:40 +00:00
Pontus Leitzler 042d10a150 gopls: update staticcheck to 2020.1.3
This change updates staticcheck to 2020.1.3.

It fixes two bugs involving //lint:ignore directives:

- When ignoring U1000 and checking a package that contains tests, Staticcheck would incorrectly complain that the linter directive didn't match any problems, even when it did.
- On repeated runs, the position information for a this linter directive didn't match anything report would either be missing, or be wildly incorrect.

Change-Id: I98bc57d290393d77af1ab8acf486239a8f125fac
Reviewed-on: https://go-review.googlesource.com/c/tools/+/220597
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-02-25 18:52:58 +00:00
Pontus Leitzler 57f3fb51f5 gopls: update Staticcheck to 2020.1.2
This change updates Staticcheck to the newly released 2020.1.2.

Change-Id: I80606b9c993de2f504c0ca3ee68f695ec8bd50e9
Reviewed-on: https://go-review.googlesource.com/c/tools/+/220477
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-02-21 19:17:10 +00:00
Rebecca Stambler 6b505debf4 gopls: use mvdan.cc/xurls for textDocument/documentLink
Our current implementation isn't robust, and it doesn't seem worth it to
invest significant effort in improving it when this library exists.

Also, make the protocol part of the default URL regex non-optional, as
the alternative is that any string of the format "foo.bar" will appear
to be a link.

Updates golang/go#33505

Change-Id: Ia430a1c193eded394f8af12050bdd4dc2a9ccc94
Reviewed-on: https://go-review.googlesource.com/c/tools/+/212517
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-12-26 21:20:25 +00:00
Rohan Challa 56463cc14b internal/lsp: create parseModHandle for storing go.mod data
Created an analogous data structure for go.mod files when we parse them
using the golang.org/x/mod package. Gopls can now access the data
within a go.mod file using a parseModHandle and the corresponding
parseModData object. This will help down the road when it is time
to implement the lsp functions for go.mod files.

Updates golang/go#31999

Change-Id: Ibd4d64569bbe3df61b203490b63399d479e7d794
Reviewed-on: https://go-review.googlesource.com/c/tools/+/211303
Run-TryBot: Rohan Challa <rohan@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-12-13 22:03:54 +00:00
Ian Cottrell a26de0c301 gopls: use go-diff for edit generation
this supports sub-line diffs and is much faster

Fixes golang/go#33003
Fixes golang/go#32586
Updates golang/go#31937

Change-Id: I02f82c75828e7e3ec804e8beee916893d4c14b3d
Reviewed-on: https://go-review.googlesource.com/c/tools/+/191018
Run-TryBot: Ian Cottrell <iancottrell@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-10-10 20:18:25 +00:00
Ian Cottrell 71c3ad9cb7 gopls: adding static check to the new gopls module
Change-Id: Ic07741211632edb2d808f0e5fd213da3dfef5676
Reviewed-on: https://go-review.googlesource.com/c/tools/+/182179
Run-TryBot: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-09-23 16:54:24 +00:00
Rebecca Stambler b87a5f9d55 internal/lsp: update gopls mod file
Change-Id: I029c690d1797b12af186fd6e445d15d3c5a27412
Reviewed-on: https://go-review.googlesource.com/c/tools/+/194685
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-09-11 19:57:40 +00:00
Ian Cottrell 5b08f89bfc internal/telemetry: clean up the exporter api
this shuffles things so there a single exporter API rather than an observer
It also removes most of the globals.
per telemetry type.

Change-Id: Iaa82abe2ded1fff9df8e067ed4a55bcbd9d9591f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/190405
Run-TryBot: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2019-08-15 23:56:12 +00:00
Michael Matloob a804cf87ae go/packages: handle ad-hoc overlays with sources outside modules
If a user runs a file= query for a source that doesn't exist,
and they are outside of a module, fill in the GoSources for the
empty package that go list returns, so the overlay can be applied.

Also add a hack for the case where go list can't determine the compiler
(gc or gccgo) a user is using because
    go list -f "{{context.Compiler}}" -- unsafe
doesn't work. If go list complains that a user is outside a module,
we'll give ourselves flexibility to guess things because there's
no right answer. So we'll guess that the compiler is gc.

Fixes golang/go#33482

Change-Id: I6a8aa0c617c4d803558389fb4272854245f59c5a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/189322
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-08-08 19:06:35 +00:00
Ian Cottrell 8aa4eac1a7 gopls: update x/tools vesion in mod file
Change-Id: I14a3000404b7f200e4ee9250ee4905174a561fd7
Reviewed-on: https://go-review.googlesource.com/c/tools/+/187477
Run-TryBot: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-07-24 18:50:37 +00:00
Ian Cottrell 8962968d5a internal/lsp: add the worker package
This is used by all the telemetry packages that come next

Change-Id: Ic84d91da2a792b53ee8839aae207ae5767ab17e0
Reviewed-on: https://go-review.googlesource.com/c/tools/+/184940
Run-TryBot: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-07-09 19:45:51 +00:00
Rebecca Stambler e9dfff8d5a gopls: update go.mod file
Change-Id: I55cb89de76d64c0f2c6d3b3e680b0f5c8e72154b
Reviewed-on: https://go-review.googlesource.com/c/tools/+/184166
Reviewed-by: Ian Cottrell <iancottrell@google.com>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
2019-06-28 16:47:26 +00:00
Paul Jolly 0707a68ae8 all: go mod tidy all modules under x/tools
CL 183264 accidentally introduced a circular modular reference from
golang.org/x/tools -> golang.org/x/tools/gopls.

Fixed by running go mod tidy on all modules under the x/tools repo for
good measure.

Change-Id: Ib09b111315cb107bc4e34015b74266d2522f33fd
Reviewed-on: https://go-review.googlesource.com/c/tools/+/184018
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-06-27 15:19:35 +00:00
Ian Cottrell d4e310b4a8 gopls: adding the gopls module
Change-Id: I521ff33f8733a7d636b8ebc611715cb19e41bc83
Reviewed-on: https://go-review.googlesource.com/c/tools/+/181946
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-06-12 23:27:58 +00:00