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

48 Коммитов

Автор SHA1 Сообщение Дата
Dmitri Shuralyov fe324ac19e all: tidy with -compat=1.18
If the goal of the tidy compatibility target is to include the 4 most
recent major Go releases, then it can be 1.18 now as Go 1.21.0 is out.

Also drop the tagx:compat directive so that relui will know to to use
the go.mod's default of 'go 1.18' when running 'go mod tidy'. This is
for the next time it updates and tags x/tools.

Change-Id: I67421d603afd1ddd76350515a8345035aa3e50df
Reviewed-on: https://go-review.googlesource.com/c/tools/+/525617
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
2023-09-05 19:16:42 +00:00
Gopher Robot a807ccf39a go.mod: update golang.org/x dependencies
Update golang.org/x dependencies to their latest tagged versions.

Change-Id: Ibc57cfb67f76bdcacf21e01be5a97b64c2ec4733
Reviewed-on: https://go-review.googlesource.com/c/tools/+/525636
Run-TryBot: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2023-09-05 16:53:41 +00:00
Gopher Robot f91c023a9b go.mod: update golang.org/x dependencies
Update golang.org/x dependencies to their latest tagged versions.
Once this CL is submitted, and post-submit testing succeeds on all
first-class ports across all supported Go versions, this repository
will be tagged with its next minor version.

Change-Id: I5624b9375a1de6bb7e6965b308186b8670b402bb
Reviewed-on: https://go-review.googlesource.com/c/tools/+/516038
Auto-Submit: Gopher Robot <gobot@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2023-08-07 00:27:42 +00:00
Gopher Robot 675bf3c243 go.mod: update golang.org/x dependencies
Update golang.org/x dependencies to their latest tagged versions.
Once this CL is submitted, and post-submit testing succeeds on all
first-class ports across all supported Go versions, this repository
will be tagged with its next minor version.

Change-Id: Ie2c9be1584d1f27ee5d9e8c0639c1d074f4669d9
Reviewed-on: https://go-review.googlesource.com/c/tools/+/507839
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Auto-Submit: Gopher Robot <gobot@golang.org>
2023-07-05 15:50:13 +00:00
Gopher Robot 27dbf85279 go.mod: update golang.org/x dependencies
Update golang.org/x dependencies to their latest tagged versions.
Once this CL is submitted, and post-submit testing succeeds on all
first-class ports across all supported Go versions, this repository
will be tagged with its next minor version.

Change-Id: Ic41189a4207d698a5b832352ca606473b3af0e1a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/503355
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Run-TryBot: Gopher Robot <gobot@golang.org>
Auto-Submit: Gopher Robot <gobot@golang.org>
2023-06-14 15:55:36 +00:00
Gopher Robot 62197261cf go.mod: update golang.org/x dependencies
Update golang.org/x dependencies to their latest tagged versions.
Once this CL is submitted, and post-submit testing succeeds on all
first-class ports across all supported Go versions, this repository
will be tagged with its next minor version.

Change-Id: Ifccc9b335c11c5f6883c88310b387e022620d88d
Reviewed-on: https://go-review.googlesource.com/c/tools/+/493577
Run-TryBot: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Gopher Robot <gobot@golang.org>
2023-05-08 17:12:46 +00:00
Gopher Robot c5f768a46c go.mod: update golang.org/x dependencies
Update golang.org/x dependencies to their latest tagged versions.
Once this CL is submitted, and post-submit testing succeeds on all
first-class ports across all supported Go versions, this repository
will be tagged with its next minor version.

Change-Id: Idc6e04f593a47ac8beeb5bd469022e6775688d77
Reviewed-on: https://go-review.googlesource.com/c/tools/+/482857
Auto-Submit: Gopher Robot <gobot@golang.org>
Run-TryBot: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-04-06 17:53:26 +00:00
Gopher Robot c0742f584b go.mod: update golang.org/x dependencies
Update golang.org/x dependencies to their latest tagged versions.
Once this CL is submitted, and post-submit testing succeeds on all
first-class ports across all supported Go versions, this repository
will be tagged with its next minor version.

Change-Id: Ica3c46702a6750ddb515555e7b6d867df1e968aa
Reviewed-on: https://go-review.googlesource.com/c/tools/+/473440
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Gopher Robot <gobot@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
2023-03-05 04:00:40 +00:00
Gopher Robot d0863f03da go.mod: update golang.org/x dependencies
Update golang.org/x dependencies to their latest tagged versions.
Once this CL is submitted, and post-submit testing succeeds on all
first-class ports across all supported Go versions, this repository
will be tagged with its next minor version.

Change-Id: I4837788c74cc58a98186c4517be6231efec17a8c
Reviewed-on: https://go-review.googlesource.com/c/tools/+/466735
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Auto-Submit: Gopher Robot <gobot@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-02-08 22:43:44 +00:00
Gopher Robot 7db99dd126 go.mod: update golang.org/x dependencies
Update golang.org/x dependencies to their latest tagged versions.
Once this CL is submitted, and post-submit testing succeeds on all
first-class ports across all supported Go versions, this repository
will be tagged with its next minor version.

Change-Id: Id3eae495650a29b882a547a2523b82ce8f187445
Reviewed-on: https://go-review.googlesource.com/c/tools/+/460502
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Gopher Robot <gobot@golang.org>
2023-01-04 16:17:47 +00:00
Gopher Robot fe60148df7 go.mod: update golang.org/x dependencies
Update golang.org/x dependencies to their latest tagged versions.
Once this CL is submitted, and post-submit testing succeeds on all
first-class ports across all supported Go versions, this repository
will be tagged with its next minor version.

Change-Id: I4009ac1fde369a228a4cb5a64718a300be1620ff
Reviewed-on: https://go-review.googlesource.com/c/tools/+/455437
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Gopher Robot <gobot@golang.org>
Auto-Submit: Gopher Robot <gobot@golang.org>
2022-12-06 15:30:00 +00:00
Gopher Robot 502c634771 go.mod: update golang.org/x dependencies
Update golang.org/x dependencies to their latest tagged versions.
Once this CL is submitted, and post-submit testing succeeds on all
first-class ports across all supported Go versions, this repository
will be tagged with its next minor version.

Change-Id: Ie52140f20343bd6dd2b73662fce64c8065f5a80b
Reviewed-on: https://go-review.googlesource.com/c/tools/+/449096
Auto-Submit: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Gopher Robot <gobot@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2022-11-09 17:16:50 +00:00
Alan Donovan 2b29c66d7e internal/gcimporter: API for shallow export data
This change adds an internal API for marshalling and
unmarshalling a types.Package to "shallow" export data,
which does not index packages other than the main one.
The import function accepts a function that loads symbols
on demand (e.g. by recursively reading export data for
indirect dependencies).

The CL includes a test that the entire standard
library can be type-checked using shallow data.

Also:
- break dependency on go/ast.
- narrow the name and type of qualifiedObject.
- add (test) dependency on errgroup, and tidy go.mod.

Change-Id: I92d31efd343cf5dd6fca6d7b918a23749e2d1e83
Reviewed-on: https://go-review.googlesource.com/c/tools/+/447737
Run-TryBot: Alan Donovan <adonovan@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2022-11-04 16:27:25 +00:00
Heschi Kreinick f112c43328 go.mod: update golang.org/x dependencies
Update golang.org/x dependencies to their latest tagged versions.
Once this CL is submitted, and post-submit testing succeeds on all
first-class ports across all supported Go versions, this repository
will be tagged with its next minor version.

Change-Id: Ic6643ddc8dc991da1e6817b994390c38ef9ed231
Reviewed-on: https://go-review.googlesource.com/c/tools/+/444536
Auto-Submit: Heschi Kreinick <heschi@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
2022-10-20 20:04:29 +00:00
Heschi Kreinick 649df2ea1a go.mod: mark as requiring -compat 1.16
When the tagging process runs go mod tidy it needs to pass -compat 1.16.
This magic comment will cause it to do so. See CL 443857.

For golang/go#48523.

Change-Id: I6824a2c78462604b9d4737444b4d16d4c21ecc99
Reviewed-on: https://go-review.googlesource.com/c/tools/+/444295
Auto-Submit: Heschi Kreinick <heschi@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-10-20 17:00:14 +00:00
Robert Findley a63075185d x/tools: update go.mod following moving LSP code to x/tools/gopls
For golang/go#54509

Change-Id: I1c3cb834e7216bde11ebd86654ae4dbce02d655e
Reviewed-on: https://go-review.googlesource.com/c/tools/+/429216
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
2022-09-07 22:05:45 +00:00
Robert Findley 8b47d4e187 all: update dependencies
Update all x/tools dependencies.

Change-Id: I0a81f9821a9267bef9057f294efc3ac1c13b59ad
Reviewed-on: https://go-review.googlesource.com/c/tools/+/419495
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-07-26 14:37:02 +00:00
Peter Weinberger 3d474c8905 internal/lsp/diff: new diff implementation to replace go-diff
The new implementation is based on Myers' paper, and is in the
package diff/lcs.

There is a new option newDiff, that can be set to 'old', 'new',
or 'both'. The default is 'both', although that may not be
the right choice for a release. See gopls/hooks/diff.go.
'both' runs both the old and new diff algorithm and saves some
statistics in a file in os.Tempdir(),

When (or if) the new code becomes the default, this logging (and
some internal checking) will be removed.

The new implementation has internal checking, which currently
panics. The code in gopls/hooks/diff.go tries to save an encrypted
(for privacy) version of the failing input.

The package diff/myers has not been replaced, but it could be.

Fixes golang/go#52966

Change-Id: Id38d76ed383c4330d9373580561765b5a2412587
Reviewed-on: https://go-review.googlesource.com/c/tools/+/396855
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
Run-TryBot: Peter Weinberger <pjw@google.com>
2022-07-24 16:55:18 +00:00
Robert Findley 48a2cc8a0d x/tools: remove dependency on golang.org/x/xerrors
Now that golang.org/x/xerrors is no longer used, we can eliminate it as
a dependency. Also update x/mod to eliminate an indirect dependency on
x/xerrors.

Fixes golang/go#52442

Change-Id: Ia3087a64e70f132f2813aa28d28d8397e5ecfded
Reviewed-on: https://go-review.googlesource.com/c/tools/+/401099
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
2022-04-20 16:11:36 +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
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
Jean-Hadrien Chabran cd7c003cd3 internal/lsp: add support for hovering runes
Enable to hover runes found in basic literals in various forms.
When a rune is found, the hover message provides a summary composed of a
printable version (if it exists) of the rune, its codepoint and its name.

Behaviour varies slightly depending on the basic literal: rune literals
always display the summary when hovered, string literals only display it
when an escaped rune sequence is found to avoid providing unnecessary
information, and finally number literals only when expressed as a
hexadecimal number whose size ranges from one to eight bytes.

Fixes golang/go#38239

Change-Id: I024fdd5c511a45c7c285e200ce1eda0669a45491
Reviewed-on: https://go-review.googlesource.com/c/tools/+/321810
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Trust: Rebecca Stambler <rstambler@golang.org>
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
2021-09-14 22:22:34 +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
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 19b1717ea5 go.mod: upgrade to Go 1.17
This change was produced using 'go mod tidy -go=1.17'
with a go command built at CL 315210.

This activates lazy loading for the x/tools module, and updates the
go.mod file to maintain the lazy-loading invariants (namely, including
an explicit requirement for every package transitively imported by the
main module).

I will send a separate CL to upgrade the gopls module, since it has
some awkward interactions with the Go 1.12 presubmit test
(golang/go#45919).

Note that this does *not* prevent users with earlier go versions from
successfully building packages from this module.

For golang/go#36460.

Change-Id: I1d2a6b28820fa6cb3d02162c14873643e4c689cf
Reviewed-on: https://go-review.googlesource.com/c/tools/+/315570
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
2021-05-03 20:05:58 +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
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
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
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 2b477fad35 tools, gopls: update Go versions in go.mod files to 1.12
gopls is officially supported for Go versions 1.14 and 1.15, but we
test with 1.12 and 1.13 as well.

Fixes golang/go#41383

Change-Id: I89f1a876ccdb25a269a3c39a4d81dd3bf37bd12f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/254754
Trust: Rebecca Stambler <rstambler@golang.org>
Trust: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
2020-09-14 22:26:08 +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 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
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
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
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
Jan Steinke be5259f298 internal/lsp: use x/xerrors to create new errors
This relates to https://github.com/golang/go/issues/31374 and should switch all instances within `gopls` to use `x/errors` instead of `fmt` to create new errors.

Change-Id: I18339b75d12418d852e0dcc2ba0ed6c2970783b3
GitHub-Last-Rev: f4a55d9b79
GitHub-Pull-Request: golang/tools#108
Reviewed-on: https://go-review.googlesource.com/c/tools/+/179880
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-08-06 19:46:56 +00:00
Rebecca Stambler d5de6b6fc5 tools: update go.mod
Change-Id: I00c016e9fe43d8ec141aa212dfc45044d819f28d
Reviewed-on: https://go-review.googlesource.com/c/tools/+/184168
Reviewed-by: Michael Matloob <matloob@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
2019-06-28 18:54:30 +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
Michael Matloob e8e6be9f45 internal/lsp: plumb suggested fixes through the LSP
Change-Id: Ia9e077e6b9cf8a817103d90481768ae99409c574
Reviewed-on: https://go-review.googlesource.com/c/tools/+/183264
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-06-26 21:02:18 +00:00
Ian Cottrell b97706b7f6 internal/lsp: add debug page serving
This adds a framework for gopls server debugging pages, and adds the standard profiling pages to it.

Change-Id: Ie319e4ad070ac41b2ae7791cb3e0e5bb4ae12ef4
Reviewed-on: https://go-review.googlesource.com/c/tools/+/179277
Run-TryBot: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-05-30 00:16:15 +00:00
Jay Conrod 15bbd99efc all: run go mod tidy
This adds golang.org/x/sync.
Needed by golang.org/x/tools/internal/lsp/source.

Change-Id: Id42e597be74ed6cb1b7c30c172c5efb3f1c0f2b1
Reviewed-on: https://go-review.googlesource.com/c/tools/+/173481
Run-TryBot: Jay Conrod <jayconrod@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-04-23 23:23:28 +00:00
Michael Matloob 11955173bd all: update golang.org/x/net dependency in go.mod
x/net now has a smaller set of transitive module dependencies, and
with this update, x/tools will also have a smaller set of transitive
module dependencies.

Change-Id: Idaa0bb72bf896bb8addc0004f17c3e97f8cc8b7a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/166877
Run-TryBot: Michael Matloob <matloob@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-03-11 21:29:46 +00:00
Dmitri Shuralyov 6a08e3108d playground: use stdlib instead of appengine packages
With modern versions of App Engine, it's no longer needed to use the
google.golang.org/appengine/... packages.

Package log from standard library can be used instead of the
google.golang.org/appengine/log package. Packages net/http and
context from standard library can be used instead of
google.golang.org/appengine/urlfetch.

This simplifies the code and reduces the number of dependences.

Start using the golangorgenv package from previous commit to
make the decision of whether to enforce sharing restrictions,
rather than relying on the appengine build tag. The appengine
build tag is no longer set in App Engine Standard with Go 1.11+
runtime. An alternative solution would be detect App Engine by
doing something like:

	// GAE_ENV environment variable is set to "standard" in App Engine environment, Go 1.11 runtime.
	// See https://cloud.google.com/appengine/docs/standard/go111/runtime#environment_variables.
	var onAppengine = os.Getenv("GAE_ENV") == "standard"

But we choose to upgrade to explicit app-scoped environment variable
configuration as part of this change. It provides better security
properties, and the value of adding an intermediate transitional step
is not high enough to justify doing it.

When getting the value of "X-AppEngine-Country" header, use its
canonical format "X-Appengine-Country" to avoid an allocation.
This does not change behavior.

Run go mod tidy (using Go 1.12).

Updates golang/go#29981
Updates golang/go#30486

Change-Id: I82a59e0f28623e06762b7ebdf3930b5ee243acda
Reviewed-on: https://go-review.googlesource.com/c/tools/+/160837
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-03-07 16:39:23 +00:00
Dmitri Shuralyov 97f80cd550 godoc/dl, godoc/proxy, godoc/short, internal/memcache: delete
These packages existed only to power cmd/godoc for the purpose of
serving the golang.org website. That functionality has moved into
x/website as part of golang/go#29206. x/website has become the
canonical source of golang.org in CL 162157, the golang.org-serving
code was removed from cmd/godoc in CL 162400, and these packages can
be deleted too now.

This removes the last dependency on the cloud.google.com/go module,
which results in a significant reduction of the number of indirect
dependencies in x/tools (this is due to issue golang/go#29935, which
affects the current version of the cloud.google.com/go module).

Run go mod tidy (using Go 1.12 RC 1).

Updates golang/go#29206
Updates golang/go#29981

Change-Id: If07e3ccae8538b3ebd51af64b6af5be5463f4906
Reviewed-on: https://go-review.googlesource.com/c/162401
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Channing Kimble-Brown <channing@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
2019-02-20 19:06:17 +00:00
Dmitri Shuralyov b4f3f03986 cmd/godoc: remove golang.org serving code
The code to serve the golang.org website has been moved to
the golang.org/x/website sub-repository. x/website has become
the canonical source of the golang.org website as of CL 162157,
and so this code can be removed from here now.

This has the benefit of removing some external dependencies
that were only used by the website in production mode, and
in turn enabling x/tools to be a smaller tools-related module.

In future changes, the golang.org/x/tools/cmd/godoc command
will be reduced in scope to be a tool for serving Go package
documentation only, not the rest of the golang.org website.

Run go mod tidy (using Go 1.12 RC 1).

Updates golang/go#29206
Updates golang/go#29981

Change-Id: I61fd25627d0506901b04688dea8d8c9da9fe8f04
Reviewed-on: https://go-review.googlesource.com/c/162400
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Channing Kimble-Brown <channing@golang.org>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
2019-02-20 19:02:57 +00:00
Michael Matloob 8dcb7bc8c7 all: add a go.mod file
This change adds a go.mod and go.sum file to the tools repo, following the
requirements stated in bcmills's comment here:
https://golang.org/issue/28136#issuecomment-462971974. It's
important to note that we will not be
adding versions to the repo for now.

The change was generated by running "go mod init" and "go mod tidy" using Go
1.11.5 in the top-level directory of the tools repository.

The tools repo has some extraneous dependencies, but they will be removed soon
(we expect a couple of weeks). At that point, our go.sum should shrink to a
small handful of entries.

Updates golang/go#28136

Change-Id: Ie7802d8d70094a855b112ad0507a47036cb81ba0
Reviewed-on: https://go-review.googlesource.com/c/162397
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-02-14 20:49:34 +00:00