gopls is officially supported for Go versions 1.14 and 1.15, but we
test with 1.12 and 1.13 as well.
Fixesgolang/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>
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>
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>
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>
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>
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: f4a55d9b79e7458ef1f1e06cb5eabbabd884f321
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>
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>
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>
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>
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>
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>
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>
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>