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

25 Коммитов

Автор SHA1 Сообщение Дата
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
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 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
Rebecca Stambler 42f498d34c internal/lsp: use protocol.Ranges for source.Identifier
Change-Id: I42cb957e3c1676e2ec7e3f50dd5e3613f3dd9555
Reviewed-on: https://go-review.googlesource.com/c/tools/+/191880
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-08-29 05:14:58 +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
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