Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/gopls: regression test and fix for missing diagnostic workflow #38211

Closed
stamblerre opened this issue Apr 1, 2020 · 2 comments
Closed

x/tools/gopls: regression test and fix for missing diagnostic workflow #38211

stamblerre opened this issue Apr 1, 2020 · 2 comments
Labels
Milestone

Comments

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Apr 1, 2020

This is a bit difficult to reproduce, so we should aim to see if we can write a regtest for it. If not, it may be a VS Code specific issue.

Code is here: https://play.golang.org/p/i7S8hpcjBhx, with a go.mod with no requires

Steps:

  1. Accept suggested fix to add "github.com/ardanlabs/conf" to go.mod.
  2. Comment out code that relies on it and accept the suggestion to remove the require from the go.mod.
  3. Uncomment the code, adding the import back.
  4. There is no diagnostic to add the import to the go.mod again.

/cc @ridersofrohan

@stamblerre stamblerre added this to the gopls/v0.4.0 milestone Apr 1, 2020
@gopherbot
Copy link

@gopherbot gopherbot commented Apr 2, 2020

Change https://golang.org/cl/226958 mentions this issue: internal/lsp: add regtest for golang/go#38211

@stamblerre
Copy link
Contributor Author

@stamblerre stamblerre commented Apr 2, 2020

I actually think that this may have been a bug in an older version of gopls (possibly relating to saving files, or to diagnostic version caching). I realized that I was only able to reproduce this with gopls/v0.3.4. Nevertheless, I will mail the CL with the regtest.

@stamblerre stamblerre modified the milestones: gopls/v0.4.0, gopls/v0.5.0 Apr 2, 2020
myitcv added a commit to govim/govim that referenced this issue Apr 30, 2020
* internal/event: re-use ocagent exporters 4b814e06
* internal/jsonrpc2: move the lock into logCommon 28a3422b
* internal/lsp/regtest: rearrange runner.go for readability 127c98bd
* internal/lsp/regtest: cosmetic fixes 290e0af1
* internal/lsp: handle hover documentation for package declarations b8428586
* internal/lsp: hide analysis diagnostics from generated files e4881b24
* internal/lsp/regtest: add a OnceMet combinator for Expectations 0c9eba77
* internal/lsp/regtest: add expository package documentation dbf5ce1e
* internal/lsp/regtest: rename and document some symbols 12a1c858
* internal/lsp/regtest: extract Runner to a new file 317da45f
* internal/lsp: instrument work done reporting to use in regtests 46dc332f
* internal/lsp: factor out progress reporting to a new WorkDone handle 9938a079
* internal/lsp/cache: correctly split env vars e9a00ec8
* internal/lsp: share common command line test functionality 006b16f6
* internal/lsp/fake: clean up Workspace.proxydir on close 7ae4988e
* go/analysis/analysistest: support testing mutually exclusive suggested fixes 4697a286
* go/internal/gcimporter: remove support for binary export data 65524870
* internal/lsp: handle different package names in signature help 352a5409
* internal/lsp/cmd: fix the command line query for definition e5642933
* internal/lsp: fix docs on hover for ungrouped package variables e0d5eebd
* internal/jsonrpc2: remove jsonrpc2.ErrDisconnected 9ea0146d
* internal/event: remove the event.eventType type a90b7300
* internal/event: don't print invalid labels bed54188
* internal/jsonrpc2: fix goroutine leak when listener is closed 479cc234
* internal/lsp: fix panic when trying to log an event f3a5411a
* internal/lsp/source: fix false positive "..." in completions 8463f397
* internal/lsp/source: add option for verbose work progress reporting 35850603
* internal/lsp: correctly handle type aliases when formatting 59e73619
* internal/lsp/regtest: track outstanding work using the progress API 38a97e00
* go/packages/packagestest: dedupe based on note position 2723c5de
* cmd/goimports: set correct permissions on Windows 01e68755
* internal/event: change event.At to be a private field a466788a
* internal/event: extract keys to their own package a82abb53
* internal/event: move event/core.Tag to event/label.Label c81623a0
* internal/event: renaming the main event API functions 7b212d60
* internal/telemetry: renaming to internal/event cf0cb927
* internal/lsp: refactor code for formatting signatures 72e4a01e
* internal/gocommand: clean up docstring typos and staticcheck errors 3d37a677
* internal/lsp: add regtest for golang/go#37984 3d57cf2e
* internal/lsp/regtest: add regtest for golang/go#38207 4e4aced3
* internal/lsp: add regtest for golang/go#38211 504fe87a
* internal/lsp/regtest: add regtest for golang/go#36951 66008de3
* internal/lsp: fix broken lsp logs 7504fd22
* internal/telemetry/export: guard against NPE when merging tag maps 26dd2a56
* internal/lsp: merge the in and out protocol logging functions 4b6a508a
* internal/jsonrpc2: rewrite streams in terms of messages 2dc43346
* go/packages/packagestest: do not walk packages and their test variants cfa8b221
* internal/lsp/tests: provide SymbolInformation.Name in @symbol annotations b4d5569d
* internal/lsp: switch the protocol logger to use the new jsonrpc2 message types 9f075f7b
* gopls: convert replay to use the new message types ca8a290c
* internal/jsonrpc2: add concrete types for Call, Notify and Response 434f7a8f
* internal/jsonrpc2: clean up the tests 98173f2f
* internal/telemetry: add support for using telemetry in tests f0ebba15
* internal/imports: update stdlib index for 1.14 978e26b7
* internal/lsp/source: enable type error analyzers c07e33ef
* internal/lsp/regtest: enable test for golang/go#37195 e3392970
* internal/lsp: fill in ServerInfo in the initialize response fc959738
* internal/lsp/regtest: generalize expectations beyond diagnostic messages f0387856
* internal/lsp/regtest: add support for custom test proxy data 92fa1ff4
* internal/lsp/fake: be more careful when closing the workspace 405595e0
* go/packages: fix misbehavior when an overlay changes the package name ea516885
* internal/lsp: fix imports issue with duplicate package decl 5744cfde
* internal/telemetry: delete the unit package 9c19d0db
* internal/telemetry: pack strings efficiently into tags 18395615
* internal/telemetry: add tag value formatting to the Key be55493b
* internal/telemetry: expose the TagOf* and Unpack* methods bd061c73
* internal/lsp: fix erroneous documentation for struct fields 5d8e1897
* go/analysis/analysistest: print unified diff for test failures 92398ad7
* internal/jsonrpc2: simplify request even futher 33e93722
* internal/jsonrpc2: remove the OnReply callbacks ce2627f3
* internal/lsp/fake: don't lock while calling formatting 6a72e378
* internal/lsp/fake: correctly configure the fake editor 3bb7580c
* internal/lsp/regtest: put testing.T back in the test func signature 91295897
* all: Fix spelling of Marshaling. 0037cb78
* gopls/internal/hooks: don't run staticcheck's SA5011 332987a8
* internal/lsp/diff/difftest: ignore for GOOS=illumos a4a177c7
* go/analysis/analysistest: give up if we can't find golden file ae52e4b5
* internal/proxydir: add an internal package for file-based proxies 07bb9fb2
* go/loader: remove check on ioutil.TestTempFile in TestStdlib 250b2131
* internal/jsonrpc2: split reply from request 1f08ef60
* internal/jsonrpc2: make the wire structures private b854406a
* internal/jsonrpc2: replace NewErrorf with fmt.Errorf 2595e725
* internal/lsp: add an extra bounds check to avoid nil pointers 79a7a312
* go/ast/inspector: impose maximum capacity e3f0bd94
* internal/lsp: remove the CallCanceller ae9902ac
* internal/lsp: improve ID formatting c92aeb74
* internal/lsp/cache: hide type errors if we fix up the AST 3bd20875
* internal/lsp: linkify IP addresses in textDocument/documentLink c08edad6
* internal/lsp/regtest: add test for issue 32149 (wrong package) 700752c2
* internal/lsp/regtest: output gopls logs on test failure bc09a2ca
* internal/lsp/protocol: make loggingStream log writes concurrency-safe 97c4fbe5
* go/packages: replace darwin with netbsd in TestSizes 77362c51
myitcv added a commit to govim/govim that referenced this issue Apr 30, 2020
* internal/event: re-use ocagent exporters 4b814e06
* internal/jsonrpc2: move the lock into logCommon 28a3422b
* internal/lsp/regtest: rearrange runner.go for readability 127c98bd
* internal/lsp/regtest: cosmetic fixes 290e0af1
* internal/lsp: handle hover documentation for package declarations b8428586
* internal/lsp: hide analysis diagnostics from generated files e4881b24
* internal/lsp/regtest: add a OnceMet combinator for Expectations 0c9eba77
* internal/lsp/regtest: add expository package documentation dbf5ce1e
* internal/lsp/regtest: rename and document some symbols 12a1c858
* internal/lsp/regtest: extract Runner to a new file 317da45f
* internal/lsp: instrument work done reporting to use in regtests 46dc332f
* internal/lsp: factor out progress reporting to a new WorkDone handle 9938a079
* internal/lsp/cache: correctly split env vars e9a00ec8
* internal/lsp: share common command line test functionality 006b16f6
* internal/lsp/fake: clean up Workspace.proxydir on close 7ae4988e
* go/analysis/analysistest: support testing mutually exclusive suggested fixes 4697a286
* go/internal/gcimporter: remove support for binary export data 65524870
* internal/lsp: handle different package names in signature help 352a5409
* internal/lsp/cmd: fix the command line query for definition e5642933
* internal/lsp: fix docs on hover for ungrouped package variables e0d5eebd
* internal/jsonrpc2: remove jsonrpc2.ErrDisconnected 9ea0146d
* internal/event: remove the event.eventType type a90b7300
* internal/event: don't print invalid labels bed54188
* internal/jsonrpc2: fix goroutine leak when listener is closed 479cc234
* internal/lsp: fix panic when trying to log an event f3a5411a
* internal/lsp/source: fix false positive "..." in completions 8463f397
* internal/lsp/source: add option for verbose work progress reporting 35850603
* internal/lsp: correctly handle type aliases when formatting 59e73619
* internal/lsp/regtest: track outstanding work using the progress API 38a97e00
* go/packages/packagestest: dedupe based on note position 2723c5de
* cmd/goimports: set correct permissions on Windows 01e68755
* internal/event: change event.At to be a private field a466788a
* internal/event: extract keys to their own package a82abb53
* internal/event: move event/core.Tag to event/label.Label c81623a0
* internal/event: renaming the main event API functions 7b212d60
* internal/telemetry: renaming to internal/event cf0cb927
* internal/lsp: refactor code for formatting signatures 72e4a01e
* internal/gocommand: clean up docstring typos and staticcheck errors 3d37a677
* internal/lsp: add regtest for golang/go#37984 3d57cf2e
* internal/lsp/regtest: add regtest for golang/go#38207 4e4aced3
* internal/lsp: add regtest for golang/go#38211 504fe87a
* internal/lsp/regtest: add regtest for golang/go#36951 66008de3
* internal/lsp: fix broken lsp logs 7504fd22
* internal/telemetry/export: guard against NPE when merging tag maps 26dd2a56
* internal/lsp: merge the in and out protocol logging functions 4b6a508a
* internal/jsonrpc2: rewrite streams in terms of messages 2dc43346
* go/packages/packagestest: do not walk packages and their test variants cfa8b221
* internal/lsp/tests: provide SymbolInformation.Name in @symbol annotations b4d5569d
* internal/lsp: switch the protocol logger to use the new jsonrpc2 message types 9f075f7b
* gopls: convert replay to use the new message types ca8a290c
* internal/jsonrpc2: add concrete types for Call, Notify and Response 434f7a8f
* internal/jsonrpc2: clean up the tests 98173f2f
* internal/telemetry: add support for using telemetry in tests f0ebba15
* internal/imports: update stdlib index for 1.14 978e26b7
* internal/lsp/source: enable type error analyzers c07e33ef
* internal/lsp/regtest: enable test for golang/go#37195 e3392970
* internal/lsp: fill in ServerInfo in the initialize response fc959738
* internal/lsp/regtest: generalize expectations beyond diagnostic messages f0387856
* internal/lsp/regtest: add support for custom test proxy data 92fa1ff4
* internal/lsp/fake: be more careful when closing the workspace 405595e0
* go/packages: fix misbehavior when an overlay changes the package name ea516885
* internal/lsp: fix imports issue with duplicate package decl 5744cfde
* internal/telemetry: delete the unit package 9c19d0db
* internal/telemetry: pack strings efficiently into tags 18395615
* internal/telemetry: add tag value formatting to the Key be55493b
* internal/telemetry: expose the TagOf* and Unpack* methods bd061c73
* internal/lsp: fix erroneous documentation for struct fields 5d8e1897
* go/analysis/analysistest: print unified diff for test failures 92398ad7
* internal/jsonrpc2: simplify request even futher 33e93722
* internal/jsonrpc2: remove the OnReply callbacks ce2627f3
* internal/lsp/fake: don't lock while calling formatting 6a72e378
* internal/lsp/fake: correctly configure the fake editor 3bb7580c
* internal/lsp/regtest: put testing.T back in the test func signature 91295897
* all: Fix spelling of Marshaling. 0037cb78
* gopls/internal/hooks: don't run staticcheck's SA5011 332987a8
* internal/lsp/diff/difftest: ignore for GOOS=illumos a4a177c7
* go/analysis/analysistest: give up if we can't find golden file ae52e4b5
* internal/proxydir: add an internal package for file-based proxies 07bb9fb2
* go/loader: remove check on ioutil.TestTempFile in TestStdlib 250b2131
* internal/jsonrpc2: split reply from request 1f08ef60
* internal/jsonrpc2: make the wire structures private b854406a
* internal/jsonrpc2: replace NewErrorf with fmt.Errorf 2595e725
* internal/lsp: add an extra bounds check to avoid nil pointers 79a7a312
* go/ast/inspector: impose maximum capacity e3f0bd94
* internal/lsp: remove the CallCanceller ae9902ac
* internal/lsp: improve ID formatting c92aeb74
* internal/lsp/cache: hide type errors if we fix up the AST 3bd20875
* internal/lsp: linkify IP addresses in textDocument/documentLink c08edad6
* internal/lsp/regtest: add test for issue 32149 (wrong package) 700752c2
* internal/lsp/regtest: output gopls logs on test failure bc09a2ca
* internal/lsp/protocol: make loggingStream log writes concurrency-safe 97c4fbe5
* go/packages: replace darwin with netbsd in TestSizes 77362c51
@stamblerre stamblerre modified the milestones: gopls/v0.5.0, gopls/v0.4.1 May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.