Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Use gopls for language server #2383

Merged
merged 16 commits into from
Mar 28, 2019
Merged

Use gopls for language server #2383

merged 16 commits into from
Mar 28, 2019

Conversation

ramya-rao-a
Copy link
Contributor

@ramya-rao-a ramya-rao-a commented Mar 18, 2019

Now that the language server from Google is ready for use, there are some changes needed in the Go extension to ensure good user experience

  • Allow installing of the gopls language server using Go: Install/Update Tools
  • Prompt users who use the language server from Sourcegraph to switch to the one from Google
  • Disable build on save feature when using gopls or bingo to avoid duplicate errors
  • Enable format and auto-completion features from the language servers

Edit as per latest commits:

  • If using modules but not any language server, users will now be prompted to install and use gopls
  • If using Sourcegraph, users will now be prompted to install and use gopls or stop disable the go.useLanguageServer setting
  • For anyone setting go.useLanguageServer for the first time, gopls will be installed and used
  • diagnostics is added to go.languageServerExperimentalFeatures setting so that user can control if they want the language server to return build/vet errors. Set to true by default. When enabled, the build and vet on save features of the extension will not be run to avoid duplicate errors
  • README updated

cc @stamblerre, @ianthehat

@stamblerre
Copy link
Contributor

This looks great, thank you for doing this! The only thing I noticed is that with gopls, you will want to disable vet on save as well as build on save, since gopls also returns vet errors.

@ramya-rao-a ramya-rao-a changed the title Accomodate gopls Use gopls for language server Mar 18, 2019
@ramya-rao-a
Copy link
Contributor Author

ramya-rao-a commented Mar 18, 2019

Thanks @stamblerre. Disabled vet on save for gopls as well

@stamblerre, @ianthehat, I pushed a commit for prompting users to use the language server when using modules, as completion is much better there compared to gocode like @stamblerre mentioned before.

My one concern here is the go to definition feature.

When using godef, we realized that the folder from where godef was being run was important to get the right context. How does the language server resolve the context issue?

@primalmotion
Copy link
Contributor

this looks awesome. I just tried and everything seems to work smooth. However auto completing imports (like json<tab>) doesn't work anymore. Am I missing something?

@mafredri
Copy link

Happy to see this coming along! Two issues I've noticed so far after a bit of usage:

  1. Documentation (on hover / cmd hover) seems to be missing, I've tested by not setting go.docsTool and I've tried both godoc and guru. Do you know if it's a limitation of gopls or something else? I've also tried to install all tools via vscode and fetching them manually
  2. The editor/extension ended up in some kind of broken state: vscode lists issues even though they have been fixed, making changes does not help but might shift the problems to point at something else. It's as if it's interpreting old code. Killing gopls did not help, but restarting vscode made the issue disappear

@primalmotion
Copy link
Contributor

I also experience the broken state. After a while, errors stay here while they have been fixed, or formatting overlapps basically screwing the entire file by combining two or more outputs. When that happens I have to reload vscode to be back in business

@stamblerre
Copy link
Contributor

Completing package names and documentation on hover (without comments, for now) should definitely still work. If you encounter this again, do you mind filing an issue with a repro case on the Go issue tracker?

The stuck diagnostics seem to be an instance of https://golang.org/issue/30786, so we can move the discussion there.

@mafredri
Copy link

Completing package names and documentation on hover (without comments, for now) should definitely still work.

I'd like to clarify that I was referring to comments, specifically. I do see function/struct signatures although they seem to use a condensed syntax (one line with ; separation instead of newlines).

Thanks for linking to the issue on the go issue tracker.

src/util.ts Outdated
export function getAlternateLanguageServer(goConfig: vscode.WorkspaceConfiguration): string {
if (goConfig['useLanguageServer'] === true
&& goConfig['alternateTools']
&& goConfig['alternateTools']['go-langserver']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to define this in the package.json file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we do, then we need to define all the tools used in the extension as well.

@@ -496,9 +513,10 @@ export function checkLanguageServer(): boolean {
return false;
}

let langServerAvailable = getBinPath('go-langserver') !== 'go-langserver';
const languageServerOfChoice = getAlternateLanguageServer(latestGoConfig) || 'go-langserver';
const langServerAvailable = path.isAbsolute(getBinPath('go-langserver'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we check here for languageServerOfChoice

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getBinPath will internally look up alternateTools and do the right thing

src/goInstallTools.ts Outdated Show resolved Hide resolved
src/goCheck.ts Outdated Show resolved Hide resolved
@ramya-rao-a
Copy link
Contributor Author

@primalmotion, @mafredri,
Thanks for trying this out and the early feedback!

All,
I have updated the PR description to include some more changes that I have made as per the latest few commits. Please have a read.

@vladbarosan,
A lot more commits have gone in, so this would need another round of review. Do you mind taking a look?

@primalmotion
Copy link
Contributor

@ramya-rao-a updated to latest pr code but I still have the issue where packages are not autocompleted.

@primalmotion
Copy link
Contributor

I also still have the errors that I fixed stuck forever until I reload vscode

@ramya-rao-a
Copy link
Contributor Author

@stamblerre By default, I will be disabling the diagnostics feature of the language server. Users can opt into it by using diagnostics in the experimentalfeatures setting. Until the issue of stuck errors are resolved, this is best for the users.

@primalmotion With the latest changes in the PR, you wont get any errors from the language server and the completion of unimported packages should also work as long as you have set go.autcompleteUnimportedPackages setting to true (as before)

@primalmotion
Copy link
Contributor

Cool. I'll give a go tomorrow. So to get the build error (cause it's cool) should I reactivate the build on save?

@ramya-rao-a
Copy link
Contributor Author

So to get the build error (cause it's cool) should I reactivate the build on save?

Yes

src/goInstallTools.ts Outdated Show resolved Hide resolved
src/goInstallTools.ts Outdated Show resolved Hide resolved
const latestGoConfig = vscode.workspace.getConfiguration('go');
if (!latestGoConfig['useLanguageServer']) return false;
if (!latestGoConfig['useLanguageServer']) return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if there is a way to get a typed response here, is very annoying that we need to do type checks at runtime :( . ill open an issue

src/goSuggest.ts Outdated Show resolved Hide resolved
src/goMain.ts Outdated Show resolved Hide resolved
src/goPath.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@vladbarosan vladbarosan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good, left some suggestions

@ramya-rao-a
Copy link
Contributor Author

Thanks @vladbarosan, I have addressed most of the comments

@ramya-rao-a ramya-rao-a merged commit 8ea6e47 into microsoft:master Mar 28, 2019
@ramya-rao-a ramya-rao-a deleted the gopls branch March 28, 2019 22:17
@primalmotion
Copy link
Contributor

\o/

@stamblerre
Copy link
Contributor

Thank you @ramya-rao-a, @vladbarosan, and everyone else who contributed to this! We really appreciate your work on getting gopls in VSCode 😄 Looking forward to our continued collaboration and improvements to VSCode-Go!

@primalmotion
Copy link
Contributor

well.. now goals crashes every few seconds..

[Trace - 6:10:02 PM] Sending notification 'textDocument/didOpen'.
Params: {"textDocument":{"uri":"file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/srv/squall/internal/cleaning/processingunits.go","languageId":"go","version":3,"text":"package cleaning\n\nimport (\n\t\"context\"\n\t\"math/rand\"\n\t\"time\"\n\n\t\"go.aporeto.io/backend/internal/crudcore\"\n\t\"go.aporeto.io/elemental\"\n\t\"go.aporeto.io/gaia\"\n\t\"go.aporeto.io/manipulate\"\n\t\"go.aporeto.io/underwater/core/tagutils\"\n\t\"go.uber.org/zap\"\n)\n\n// DeleteProcessingUnitsOfEnforcer deletes all the processing units managed by the pu with the given ID.DeleteProcessingUnitsOfEnforcer\n// It will return a list of elemental.Events containing the pus deleted.\nfunc DeleteProcessingUnitsOfEnforcer(ctx context.Context, m manipulate.TransactionalManipulator, puID string) ([]*elemental.Event, error) {\n\n\tmctx := manipulate.NewContext(\n\t\tctx,\n\t\tmanipulate.ContextOptionFilter(\n\t\t\tmanipulate.NewFilterComposer().\n\t\t\t\tWithKey(\"puid\").Equals(puID).\n\t\t\t\tWithKey(\"archived\").Equals(false).\n\t\t\t\tDone(),\n\t\t),\n\t)\n\n\tvar pus gaia.ProcessingUnitsList\n\tif err := m.RetrieveMany(mctx, &pus); err != nil {\n\t\treturn nil, err\n\t}\n\n\tevents := make([]*elemental.Event, len(pus))\n\tfor i, pu := range pus {\n\t\tif err := crudcore.Delete(ctx, m, \"\", manipulate.WriteConsistencyDefault, pu, true); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tevents[i] = elemental.NewEvent(elemental.EventDelete, pu)\n\t}\n\n\treturn events, nil\n}\n\nconst (\n\tpuUnresponsiveTimeout  = 5 * time.Minute\n\tpuDeletionTimeout      = 24 * time.Hour\n\tpuCollectedInfoTimeout = 24 * time.Hour\n)\n\n// CleanProcessingUnitJob cleans pu collected info or unresponsive.\nfunc CleanProcessingUnitJob(ctx context.Context, m manipulate.TransactionalManipulator, pushFunc func(...*elemental.Event)) {\n\n\tr := time.Duration(rand.Intn(1)) * time.Minute\n\n\tcleanEnforcerCollectedInfo(ctx, m)\n\tmarkUnresponsiveProcessingUnit(ctx, m, pushFunc)\n\tdeleteUnknownProcessingUnit(ctx, m, pushFunc)\n\n\tcleanCollectedInfoTicker := time.NewTicker(puCollectedInfoTimeout + r)\n\tdefer cleanCollectedInfoTicker.Stop()\n\n\tunresponsiveTicker := time.NewTicker(puUnresponsiveTimeout + r)\n\tdefer unresponsiveTicker.Stop()\n\n\tdeletionTicker := time.NewTicker(puDeletionTimeout + r)\n\tdefer deletionTicker.Stop()\n\n\tfor {\n\t\tselect {\n\n\t\tcase <-unresponsiveTicker.C:\n\t\t\tmarkUnresponsiveProcessingUnit(ctx, m, pushFunc)\n\n\t\tcase <-deletionTicker.C:\n\t\t\tdeleteUnknownProcessingUnit(ctx, m, pushFunc)\n\n\t\tcase <-cleanCollectedInfoTicker.C:\n\t\t\tcleanEnforcerCollectedInfo(ctx, m)\n\n\t\tcase <-ctx.Done():\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc markUnresponsiveProcessingUnit(ctx context.Context, m manipulate.TransactionalManipulator, pushFunc func(...*elemental.Event)) {\n\n\tfilter := manipulate.NewFilterComposer().\n\t\tWithKey(\"operationalstatus\").Equals(gaia.EnforcerOperationalStatusConnected).\n\t\tWithKey(\"lastpoketime\").LesserThan(time.Now().Add(-puUnresponsiveTimeout)).\n\t\tDone()\n\n\tvar pus gaia.ProcessingUnitList\n\tvar mctx manipulate.Context\n\n\tpage := 0\n\tpageSize := 100\n\tnow := time.Now()\n\n\tfor {\n\n\t\tpage++\n\n\t\tpus = gaia.ProcessingUnitList{}\n\t\tmctx = manipulate.NewContext(\n\t\t\tctx,\n\t\t\tmanipulate.ContextOptionOrder(\"id\"),\n\t\t\tmanipulate.ContextOptionFilter(filter),\n\t\t\tmanipulate.ContextOptionPage(page, pageSize),\n\t\t)\n\n\t\tif err := m.RetrieveMany(mctx, &pus); err != nil {\n\t\t\tzap.L().Error(\"Unable to retrieve list of outdated pus\", zap.Error(err))\n\t\t\tbreak\n\t\t}\n\n\t\tif len(pus) == 0 {\n\t\t\tbreak\n\t\t}\n\n\t\tfor _, pu := range pus {\n\n\t\t\tpu.OperationalStatus = gaia.EnforcerOperationalStatusUnknown\n\t\t\tpu.UpdateTime = now\n\t\t\tpu.NormalizedTags = tagutils.Normalize(pu)\n\n\t\t\tif err := m.Update(nil, pu); err != nil {\n\t\t\t\tzap.L().Error(\"Unable to update operational status of pu\",\n\t\t\t\t\tzap.String(\"id\", pu.ID),\n\t\t\t\t\tzap.Error(err),\n\t\t\t\t)\n\t\t\t}\n\n\t\t\tpushFunc(elemental.NewEvent(elemental.EventUpdate, pu))\n\t\t}\n\t}\n}\n\nfunc deleteUnknownProcessingUnit(ctx context.Context, m manipulate.TransactionalManipulator, pushFunc func(...*elemental.Event)) {\n\n\tfilter := manipulate.NewFilterComposer().\n\t\tWithKey(\"operationalstatus\").Equals(gaia.EnforcerOperationalStatusUnknown).\n\t\tWithKey(\"lastpoketime\").LesserThan(time.Now().Add(-puDeletionTimeout)).\n\t\tDone()\n\n\tvar pus gaia.ProcessingUnitList\n\tvar mctx manipulate.Context\n\n\tpage := 0\n\tpageSize := 100\n\n\tfor {\n\n\t\tpage++\n\n\t\tpus = gaia.ProcessingUnitList{}\n\t\tmctx = manipulate.NewContext(\n\t\t\tctx,\n\t\t\tmanipulate.ContextOptionOrder(\"id\"),\n\t\t\tmanipulate.ContextOptionFilter(filter),\n\t\t\tmanipulate.ContextOptionPage(page, pageSize),\n\t\t)\n\n\t\tif err := m.RetrieveMany(mctx, &pus); err != nil {\n\t\t\tzap.L().Error(\"Unable to retrieve the list of pu to delete\", zap.Error(err))\n\t\t\tcontinue\n\t\t}\n\n\t\tif len(pus) == 0 {\n\t\t\tbreak\n\t\t}\n\n\t\tfor _, pu := range pus {\n\n\t\t\tif err := m.Delete(nil, pu); err != nil {\n\t\t\t\tzap.L().Error(\"Unable to delete pu\",\n\t\t\t\t\tzap.String(\"id\", pu.ID),\n\t\t\t\t\tzap.Error(err),\n\t\t\t\t)\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tevents, err := DeleteProcessingUnitsOfEnforcer(ctx, m, pu.ID)\n\t\t\tif err != nil {\n\t\t\t\tzap.L().Error(\"Unable to delete pus managed by pu\",\n\t\t\t\t\tzap.String(\"id\", pu.ID),\n\t\t\t\t\tzap.Error(err),\n\t\t\t\t)\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tevents = append(events, elemental.NewEvent(elemental.EventDelete, pu))\n\n\t\t\tpushFunc(events...)\n\t\t}\n\t}\n}\n\nfunc cleanEnforcerCollectedInfo(ctx context.Context, m manipulate.Manipulator) {\n\n\tctx, cancel := context.WithTimeout(ctx, 10*time.Minute)\n\tdefer cancel()\n\n\tmctx := manipulate.NewContext(\n\t\tctx,\n\t\tmanipulate.ContextOptionFilter(\n\t\t\tmanipulate.NewFilterComposer().\n\t\t\t\tWithKey(\"lastcollectiontime\").LesserThan(time.Now().Add(-puCollectedInfoTimeout)).\n\t\t\t\tWithKey(\"lastcollectiontime\").NotEquals(time.Time{}).\n\t\t\t\tDone(),\n\t\t),\n\t)\n\n\tdest := &gaia.ProcessingUnitList{}\n\tif err := manipulate.Retry(ctx, func() error { return m.RetrieveMany(mctx, dest) }, nil); err != nil {\n\t\tzap.L().Error(\"Could not retrieve pus\", zap.Error(err))\n\t}\n\n\tpus := dest.List()\n\tif len(pus) == 0 {\n\t\treturn\n\t}\n\n\tfor _, i := range pus {\n\t\te := i.(*gaia.Enforcer)\n\t\te.CollectedInfo = map[string]string{}\n\t\te.LastCollectionTime = time.Time{}\n\t}\n\n\tmctx = manipulate.NewContext(ctx)\n\tif err := manipulate.Retry(ctx, func() error { return m.Update(mctx, pus...) }, nil); err != nil {\n\t\tzap.L().Error(\"Could not update pus\", zap.Error(err))\n\t}\n\n\tzap.L().Debug(\"ProcessingUnit debug cleaned\")\n}\n"}}


[Trace - 6:10:02 PM] Received response 'workspace/configuration - (1)' in 2ms.
Params: [null]


[Trace - 6:10:02 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"Invalid config gopls type \u003cnil\u003e"}


[Error - 6:10:02 PM] Invalid config gopls type <nil>
[Trace - 6:10:02 PM] Sending request 'textDocument/documentSymbol - (1)'.
Params: {"textDocument":{"uri":"file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/srv/squall/internal/cleaning/processingunits.go"}}


panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x131e558]

goroutine 4 [running]:
golang.org/x/tools/internal/lsp/source.funcSymbol(0xc00055a720, 0x0, 0x0, 0xc0000be140, 0xc019e6ace0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/lsp/source/symbols.go:68 +0x58
golang.org/x/tools/internal/lsp/source.DocumentSymbols(0x14c52c0, 0xc0000be300, 0x14c7740, 0xc00012bd60, 0xc0001e2090, 0x81, 0x14c7740)
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/lsp/source/symbols.go:49 +0x912
golang.org/x/tools/internal/lsp.(*server).DocumentSymbol(0xc00002ad40, 0x14c52c0, 0xc0000be300, 0xc00019a980, 0xc00019a980, 0x0, 0x0, 0x102cd11, 0x1451dc0)
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/lsp/server.go:484 +0x100
golang.org/x/tools/internal/lsp/protocol.serverHandler.func1(0x14c52c0, 0xc0000be300, 0xc0001723f0, 0xc000199040)
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/lsp/protocol/server.go:274 +0x399f
golang.org/x/tools/internal/jsonrpc2.(*Conn).run(0xc0001723f0, 0x14c5300, 0xc00001c0e0, 0x0, 0x0)
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/jsonrpc2/jsonrpc2.go:327 +0x67b
golang.org/x/tools/internal/jsonrpc2.NewConn.func4(0xc0001723f0, 0x14c5300, 0xc00001c0e0)
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/jsonrpc2/jsonrpc2.go:107 +0x3f
created by golang.org/x/tools/internal/jsonrpc2.NewConn
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/jsonrpc2/jsonrpc2.go:106 +0x18d
[Error - 6:10:05 PM] Connection to server got closed. Server will not be restarted.
[Error - 6:10:05 PM] Request textDocument/documentSymbol failed.
Error: Connection got disposed.
	at Object.dispose (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-jsonrpc/lib/main.js:876:25)
	at Object.dispose (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-languageclient/lib/client.js:57:35)
	at LanguageClient.handleConnectionClosed (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-languageclient/lib/client.js:2019:42)
	at LanguageClient.handleConnectionClosed (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-languageclient/lib/main.js:126:15)
	at closeHandler (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-languageclient/lib/client.js:2006:18)
	at CallbackList.invoke (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-jsonrpc/lib/events.js:62:39)
	at Emitter.fire (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-jsonrpc/lib/events.js:120:36)
	at closeHandler (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-jsonrpc/lib/main.js:226:26)
	at CallbackList.invoke (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-jsonrpc/lib/events.js:62:39)
	at Emitter.fire (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-jsonrpc/lib/events.js:120:36)
	at StreamMessageReader.fireClose (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-jsonrpc/lib/messageReader.js:111:27)
	at Socket.listen.readable.on (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-jsonrpc/lib/messageReader.js:151:46)
	at Socket.emit (events.js:187:15)
	at Pipe.Socket._destroy._handle.close [as _onclose] (net.js:596:12)
[Error - 6:10:05 PM] Request textDocument/codeAction failed.
Error: Connection got disposed.
	at Object.dispose (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-jsonrpc/lib/main.js:876:25)
	at Object.dispose (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-languageclient/lib/client.js:57:35)
	at LanguageClient.handleConnectionClosed (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-languageclient/lib/client.js:2019:42)
	at LanguageClient.handleConnectionClosed (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-languageclient/lib/main.js:126:15)
	at closeHandler (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-languageclient/lib/client.js:2006:18)
	at CallbackList.invoke (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-jsonrpc/lib/events.js:62:39)
	at Emitter.fire (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-jsonrpc/lib/events.js:120:36)
	at closeHandler (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-jsonrpc/lib/main.js:226:26)
	at CallbackList.invoke (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-jsonrpc/lib/events.js:62:39)
	at Emitter.fire (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-jsonrpc/lib/events.js:120:36)
	at StreamMessageReader.fireClose (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-jsonrpc/lib/messageReader.js:111:27)
	at Socket.listen.readable.on (/Users/tonio/.vscode/extensions/ms-vscode.go-0.9.3-beta4/node_modules/vscode-jsonrpc/lib/messageReader.js:151:46)
	at Socket.emit (events.js:187:15)
	at Pipe.Socket._destroy._handle.close [as _onclose] (net.js:596:12)

@stamblerre
Copy link
Contributor

@primalmotion: Are you using gopls at the latest commit? I'm not able to reproduce, but if you are at tip, please file an issue here.

@primalmotion
Copy link
Contributor

I was on the tip. Then I upgraded go tools with vscode and it started to fail.
I go installed it again manually and now it works. Weird

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants