1
0
mirror of https://github.com/golang/go synced 2024-09-30 16:18:35 -06:00
Commit Graph

56 Commits

Author SHA1 Message Date
Rebecca Stambler
20e5918576 gopls/doc: improve troubleshooting docs with specifics
Add the exact VS Code settings that users need to capture valuable logs.

Change-Id: If6b4874d1d3beab2fa6da054615dd7973b6e3fa9
Reviewed-on: https://go-review.googlesource.com/c/tools/+/214940
Reviewed-by: Heschi Kreinick <heschi@google.com>
2020-01-15 20:40:27 +00:00
Damien Lespiau
fdfa0def04 gopls/doc: fix it's/its typo
Change-Id: If8eecf41ae6d83bf4228e818aa1ef9ee3267db58
GitHub-Last-Rev: 73153ddfb8c86a145eef79997b18a5cdef21b8bf
GitHub-Pull-Request: golang/tools#197
Reviewed-on: https://go-review.googlesource.com/c/tools/+/214858
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2020-01-15 15:48:44 +00:00
Rob Findley
850357681a gopls/integration/govim: update build steps to capture artifacts
Govim integration tests generate a number of artifacts, including both
the govim and gopls logs, that can be useful in debugging failures. This
change updates our cloud build configuration to capture these artifacts,
along with several other minor improvements.

Notably artifacts are uploaded to GCS as a separate build step, so that
we have the potential to use its granular permission model for sharing
these artifacts. Right now, this requires temporarily swallowing the
exit code of `go test` so that the build can proceed.

Also:
 - Update govim to a newer version; we still can't use latest as there
   isn't a tagged version that contains the requisite flag change.
 - Alter the test harness to run tests from the github.com/govim/govim
   module root.
 - Switch use a major version label when referring to the test harness
   build step, to allow for breaking changes (such as the one made
   here).
 - Add a missing copyright header to run_local.sh.
 - Update run_local.sh to work with the modified harness.
 - Update documentation accordingly.

Change-Id: Ie5ddaf54e775371a36163f98c1beb90c217be931
Reviewed-on: https://go-review.googlesource.com/c/tools/+/214577
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-01-15 14:49:07 +00:00
Rob Findley
e23c44e711 gopls/doc: minor fixes in design.md and implementation.md
A couple sentences are clarified in design.md, and a broken link is
fixed in implementation.md.

Change-Id: Ibbb4c2f74ce9e46c565a7e90798047e7168b076e
Reviewed-on: https://go-review.googlesource.com/c/tools/+/214798
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-01-14 23:33:23 +00:00
Koichi Shiraishi
4da8041706 gopls/doc: fix 'Report the issue' bad link
Change-Id: Ie31d1f375ea93840926d23aef5232ccb77b883a3
Reviewed-on: https://go-review.googlesource.com/c/tools/+/214537
Reviewed-by: Heschi Kreinick <heschi@google.com>
2020-01-13 20:22:26 +00:00
Peter Weinberger
81ef4df1d3 gopls/integration: save more precise parsing information
These are changes to treat errors more like responses. They are
important for the forthcoming log viewer.

Change-Id: Ief8de6ecea716673d4aee417de205842ceab4fc8
Reviewed-on: https://go-review.googlesource.com/c/tools/+/213124
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-01-02 18:22:54 +00:00
Rob Findley
9497f49d57 gopls/integration: cosmetic/ergonomic updates
Some ergonomic and cosmetic updates are made to the integration/replay
and integration/parse packages, following a pass through the code:
 + In the README, a some typos are corrected.
 + A few symbols are renamed:
   - Direction->MsgType, since this type is more than a client-server
     direction
   - logRec->scanLogs, to be more consistent with the naming convention
     SplitFuncs in the bufio package
   - CamelCase is applied in a few places.
 + Context is plumbed through, rather than use a package local ctx.
 + In a few cases, returning an error is preferred over log.Fatal.
 + Some duplicated code is deleted, and types from the parse package are
   reused. (this was probably cruft from the repo migration)
 + The logfile is made an argument rather than a flag to the replay
   tool.

Change-Id: Ie72e6e8a4d7020d8cf708f6791353897791bcc86
Reviewed-on: https://go-review.googlesource.com/c/tools/+/211057
Reviewed-by: Peter Weinberger <pjw@google.com>
2020-01-02 14:09:08 +00:00
Dan Kortschak
6c68fec0bc all: remove many cases of space-space
Change-Id: I49eb8410d4143c67dfccf027f8b2794e66963415
Reviewed-on: https://go-review.googlesource.com/c/tools/+/212580
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-12-30 19:07:42 +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
Rebecca Stambler
a7b3459f04 gopls/doc: remove unnecessary settings from VSCode documentation
The EOL setting is no longer needed, as the issue it was correcting
has been fixed. The file watching setting is not really being respected
correctly in the current version of gopls, as we are currently reworking
it.

Change-Id: I0aa9546f0c806bcf326eb83b515bee4bce4c6864
Reviewed-on: https://go-review.googlesource.com/c/tools/+/212497
Reviewed-by: Heschi Kreinick <heschi@google.com>
2019-12-23 18:49:12 +00:00
Rob Findley
d7ab245118 gopls/integration: add a first cut of govim integration tests
Govim has integration tests that we can leverage to help guard gopls
against regressions. Changes have been submitted upstream to facilitate
running these tests against a locally built gopls binary
(https://github.com/govim/govim/pull/629)

This CL adds a Dockerfile to build an image that has a version of govim
available and ready for testing. This is then used to create a custom
build step in a separate Cloud Build configuration, that builds gopls
from source and runs the govim integration tests.

A script (run_local.sh) is also added to facilitate running these tests
locally.

Change-Id: If68eabf9863a1689e29d9d744ff953d94a2b7681
Reviewed-on: https://go-review.googlesource.com/c/tools/+/212018
Reviewed-by: Paul Jolly <paul@myitcv.org.uk>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-12-23 18:47:16 +00:00
Jorge L. Fatta
0b43622770 fix: using section links to IDE specific doc
Fix the link to the IDE specific usage documentation (now under /doc/ folder).

Change-Id: Ib0efb8a107195317c7a4a535fc9f624fe277840e
GitHub-Last-Rev: 66f771f799c1e93fd9337040f0b1166061f6419e
GitHub-Pull-Request: golang/tools#192
Reviewed-on: https://go-review.googlesource.com/c/tools/+/211561
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-12-17 14:12:49 +00:00
Ian Cottrell
bbbf87ae26 gopls: add status and roadmap to the main readme.
Change-Id: I5794d1afd0bcddbe3c1a4e2546133df4ce044e2f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/211577
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-12-17 03:36:36 +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
Iskander Sharipov
b1451cf344 gopls/integration: remove commented-out debug code
Change-Id: I824a36f893970588534ec85ade93dfa100d14fe6
Reviewed-on: https://go-review.googlesource.com/c/tools/+/209697
Run-TryBot: Iskander Sharipov <quasilyte@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Peter Weinberger <pjw@google.com>
2019-12-03 23:32:40 +00:00
Peter Weinberger
c197fd4bf3 gopls/integration: add the replay command to replay LSP logs
Documentation is in replay/README.md

Change-Id: Ic5a2b59269d640747a9fea7bb99fb74b2d069111
Reviewed-on: https://go-review.googlesource.com/c/tools/+/209577
Run-TryBot: Peter Weinberger <pjw@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-12-03 13:40:12 +00:00
Jędrzej Szczepaniak
6e064ea0cf internal/lsp: link to the new pkg.go.dev instead of godoc.org
Updates golang/go#35563

Change-Id: I88ae3f742daf5043d4784fe8827454fb1ce1f9db
Reviewed-on: https://go-review.googlesource.com/c/tools/+/209337
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-11-30 07:06:09 +00:00
Rebecca Stambler
724660f1af gopls/doc: add documentation for gopls with Atom
Change-Id: Ia2e8913c8ff8d7da3061344f2d4e98bab7b4fbd7
Reviewed-on: https://go-review.googlesource.com/c/tools/+/209097
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-11-27 06:49:51 +00:00
Rebecca Stambler
d7101b74a4 internal/lsp: set version correctly after textDocument/didOpen
The early return logic for didOpen events in
(*snapshot).invalidateContent was preventing the creation of a new
snapshot, which was in turn stopping the versions from being updated.

This exposed a fundamental issue in the way we were calculating
workspace diagnostics. Since we weren't waiting for diagnostics to be
completed for an entire snapshot before replying that the server had
been initialized, snapshots were being cloned without any type
information. For quickfix code actions, we assume that we have all
information cached (since we need to have sent the diagnostics that the
quickfix is mapped to), so we were not finding the cached analysis
results.

To handle this in the short-term, we key analyses by their names, and
then regenerate results as-needed for code actions. This is technically
more correct than simply assuming that we have the analyses cached. In a
follow-up CL, I will send a follow-up that will make sure that
snapshots "wait" on each other to be fully constructed before being
cloned.

Change-Id: Ie89fcdb438b6b8b675f87335561bf47b768641ac
Reviewed-on: https://go-review.googlesource.com/c/tools/+/208265
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2019-11-25 19:35:51 +00:00
Muir Manders
aa38f8e97a gopls/doc: expand Emacs docs
- expand starter config to be more self-contained
- add section for gopls config settings

Change-Id: I9b2468acd90dff2d0469aa16ce715033eed4973b
Reviewed-on: https://go-review.googlesource.com/c/tools/+/206798
Run-TryBot: Muir Manders <muir@mnd.rs>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-11-12 19:56:55 +00:00
Ian Cottrell
f79515f338 gopls: control features for command line tests
A general mechanism for modifying the features in command line tests
Use it to turn of go-diff for now

Fixes golang/go#35392

Change-Id: Ie79723e94fb14fcde1e98709a63f44046e101bc4
Reviewed-on: https://go-review.googlesource.com/c/tools/+/205739
Run-TryBot: Ian Cottrell <iancottrell@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-11-07 01:09:34 +00:00
Josa Gesell
80f3f9ca08 Fix header level in settings.md
Change-Id: Ic4ecd583ce62e624dad568f9c421a87e4d222fd4
GitHub-Last-Rev: 0a4f186beb7774134bd7e400c90b4dd6e129a899
GitHub-Pull-Request: golang/tools#180
Reviewed-on: https://go-review.googlesource.com/c/tools/+/203157
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-10-28 21:55:54 +00:00
Rebecca Stambler
fc4ffaa1ce gopls: update go.mod file
It's been a while since we updated, and this will make things easier for
users who want to try new features.

Change-Id: I3accd77e23bf2d0bbafaba16dcab8179e6a14253
Reviewed-on: https://go-review.googlesource.com/c/tools/+/201638
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-10-21 18:45:54 +00:00
Ainar Garipov
846f856e7d gopls/doc: fix issue links for vim-lsc
Change-Id: Iecdc087da7e48a170616e0453c5c4fe1a45ef95e
Reviewed-on: https://go-review.googlesource.com/c/tools/+/201419
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-10-17 10:18:17 +00:00
Shengjing Zhu
5fa5b1782b gopls/doc: instructions for adding settings in coc.nvim
Change-Id: I7d69477cc103e8e45b0e9394e32945a0d8ee19b3
Reviewed-on: https://go-review.googlesource.com/c/tools/+/200868
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-10-14 14:15:50 +00:00
Ian Cottrell
5889748991 internal/lsp: use options hooks to install diff driver
Change-Id: I2f94c2a68d0036a47ccac3fce07cf9f3b784d443
Reviewed-on: https://go-review.googlesource.com/c/tools/+/200558
Run-TryBot: Ian Cottrell <iancottrell@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-10-11 16:38:31 +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
Panos Georgiadis
83b12cb08e Fix vscode config to watch file changes
Fix the documentation by using the correct configuration for
watching file changes outside of the editor.

Fixes https://github.com/microsoft/vscode-go/issues/2810

Change-Id: Ib550d9831fe4563ceb5917d9196b201a03b051d2
GitHub-Last-Rev: 86c49abed8a0c79b641e02a23128b4654d2d6d48
GitHub-Pull-Request: golang/tools#169
Reviewed-on: https://go-review.googlesource.com/c/tools/+/199578
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-10-07 17:02:13 +00:00
Fazlul Shahriar
8a18b87bf6 all: fix broken links to LSP specification
Change-Id: Ied2cfa57012a8ec3c8bdd03a97fa7fc8bc744be9
Reviewed-on: https://go-review.googlesource.com/c/tools/+/198381
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-10-02 18:32:53 +00:00
Ian Cottrell
6816ec868d gopls: refactor the cmd tests
This allows them to be run from the gopls module as well to test
the code with the hooks installed.

Change-Id: I3079a04ffe3bd221ccc2523e746cbed384e05e2f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/196321
Run-TryBot: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-09-23 22:12:42 +00:00
Rebecca Stambler
59c6680fe2 gopls/doc: fix typo in settings
Change-Id: Ia504ebccae77db5533c8a29a455f074068db78b4
Reviewed-on: https://go-review.googlesource.com/c/tools/+/196663
Reviewed-by: Ian Cottrell <iancottrell@google.com>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-09-23 18:36:22 +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
Ian Cottrell
c426260dee gopls: add a hooks package
This allows us to hook functionality from the main tools repository with
alternate or extended implementations.

Change-Id: Ibc66cdd15ee80f1104a8464f1e28763a41d5765a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/196319
Run-TryBot: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-09-20 02:37:04 +00:00
Rebecca Stambler
58d531046a gopls: update go.mod for v0.1.7
Change-Id: I8953ba567b7aecb664a093acd5a91370a6e1fde9
Reviewed-on: https://go-review.googlesource.com/c/tools/+/196280
Reviewed-by: Ian Cottrell <iancottrell@google.com>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
2019-09-18 21:49:20 +00:00
Matt Layher
bbfbbc9265 gopls/doc: add instructions for VSCode remote development
Change-Id: I0a7e9feea556e21b2feb0540136f957de98526c0
Reviewed-on: https://go-review.googlesource.com/c/tools/+/195981
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-09-17 20:28:04 +00:00
Rebecca Stambler
3512ebf574 gopls: update go.mod
Change-Id: Ie42b99e23d94d8a5f745cbfb81d943f7a4d73867
Reviewed-on: https://go-review.googlesource.com/c/tools/+/195657
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-09-16 17:33:50 +00:00
Ainar Garipov
1ccc110ba9 gopls/doc/vim.md: enable suppress_stderr for natebosch/vim-lsc
By default, github.com/natebosch/vim-lsc shows messages from stderr in
vim's :messages, which may cause problems and is generally annoying.
Suggest disabling that by setting suppress_stderr to v:true.

Change-Id: If997b8f8fd036a1ac08ba74a3886f33ff71413c2
Reviewed-on: https://go-review.googlesource.com/c/tools/+/194137
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-09-16 02:06:55 +00:00
Rebecca Stambler
96954830e1 gopls/doc: add and make minor changes to documentation
Change-Id: Ibb7d7715541ee2a712dd6927abceadc45ec60b41
Reviewed-on: https://go-review.googlesource.com/c/tools/+/195517
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-09-16 01:38:12 +00:00
Daniel Cormier
44811c0174 Fixed documentation for gopls installation
Fixes this problem when trying to use the documented installation command:

```
$ GO111MODULE=on go get golang.org/x/tools gopls@latest
go: finding golang.org/x/tools latest
go: downloading golang.org/x/tools v0.0.0-20190911230505-6bfd74cf029c
go: extracting golang.org/x/tools v0.0.0-20190911230505-6bfd74cf029c
go get gopls@latest: malformed module path "gopls": missing dot in first path element
```

Change-Id: Ifdd13ec85eca5a069c17ae89486efe1abf4016f4
GitHub-Last-Rev: a4ddc02e3b8e6ccce12dfa711a8e7af5edb1302c
GitHub-Pull-Request: golang/tools#158
Reviewed-on: https://go-review.googlesource.com/c/tools/+/195037
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-09-12 13:20:05 +00:00
Rebecca Stambler
6bfd74cf02 internal/lsp: update go.mod for next version
Change-Id: Ic2e437f7daec94f648ba1a13e99a9ada462cdf49
Reviewed-on: https://go-review.googlesource.com/c/tools/+/194897
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2019-09-11 23:05:05 +00:00
Rebecca Stambler
63a3583f64 gopls/doc: update config settings in documentation
Change-Id: Ieef4c541fdc48afc5b6064b7057edab3a28fefb0
Reviewed-on: https://go-review.googlesource.com/c/tools/+/194686
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-09-11 20:22:09 +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
Ainar Garipov
feee8acb39 all: fix more typos
Change-Id: I978ad5e1800ebfceb78aaced438331a8341715d4
Reviewed-on: https://go-review.googlesource.com/c/tools/+/194697
Reviewed-by: Toshihiro Shiino <shiino.toshihiro@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-09-11 15:13:14 +00:00
Rebecca Stambler
0673112484 internal/lsp: update to latest version of x/tools
The fix for golang/go#29313 just went in, so update so people can fetch
it more easily.

Change-Id: I60fda011dfdd62d5de429834a6692f6b21074f0d
Reviewed-on: https://go-review.googlesource.com/c/tools/+/194377
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-09-09 21:46:02 +00:00
Rebecca Stambler
a4fdb3a8b2 gopls: update x/tools version
Change-Id: Ibf3c3381a3ecb3015b44436b7e28b615fab00bf4
Reviewed-on: https://go-review.googlesource.com/c/tools/+/193378
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-09-04 21:13:25 +00:00
Karthik Nayak
a56fc290d6 gopls: fix typo in the design document
Change-Id: I0ae8f7c9c02660111236ba88eba8faa69a974ab8
GitHub-Last-Rev: d428dbf26672646c4d25ded71e47a710279a8444
GitHub-Pull-Request: golang/tools#149
Reviewed-on: https://go-review.googlesource.com/c/tools/+/192898
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-09-03 01:11:30 +00:00
Ian Cottrell
062dbaebb6 cmd/gopls: add documentation
Much of this documentation has been collated from other sources,
but this pulls it all into one coherent and public structure in
a way that allows us to peer review changes.

Change-Id: Ic24a59bb92b27ec85d2f57affcf2eb396c9de3c0
Reviewed-on: https://go-review.googlesource.com/c/tools/+/191741
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-08-27 15:23:08 +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