Open bbarker opened 4 years ago
I can't provide any assistance with WSL issues, if that's what this turns out to be - I'd suggest asking on FP slack if anybody has had any success under that sort of configuration.
I know that things seemed to work ok with a SSH remote session - not tried with docker yet, though I feasibly could
Just one additional data point, after being away from the container for a while. I started it up again, and vscode, and it worked for a couple of days. When I decided to perform reload window (Ctrl+R), it again stopped working, and Restart/Reconnect did not seem to help.
I suspect it isn't WSL related, as I'm using the Remote Containers functionality rather than Remote WSL, in this case (which is a similar addon, also from Microsoft). And of course it may not be related to that either.
No worries, I'm in it for the long haul! Even having this working every few days is a vast improvement over nothing. Thank you!
Anything useful in the output window?
Not in the output I typically look at, but I just found out about the "browser console":
Here's a more complete, textual log of the above, including the section that contains Command 'PureScript: Restart/Reconnect purs IDE server' resulted in an error (Running the contributed command: 'purescript.restartPscIde' failed.)
, which seems to occur whenever I try to restart purs IDE server:
console.ts:137 [Extension Host] rejected promise not handled within 1 second: Error: spawn C:\Users\Brandon\AppData\Local\Programs\Microsoft VS Code\gpgconf ENOENT
t.log @ console.ts:70
console.ts:137 [Extension Host] stack trace: Error: spawn C:\Users\Brandon\AppData\Local\Programs\Microsoft VS Code\gpgconf ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19) at onErrorNT (internal/child_process.js:456:16) at processTicksAndRejections (internal/process/task_queues.js:81:21)
t.log @ console.ts:70
log.ts:197 ERR spawn C:\Users\Brandon\AppData\Local\Programs\Microsoft VS Code\gpgconf ENOENT: Error: spawn C:\Users\Brandon\AppData\Local\Programs\Microsoft VS Code\gpgconf ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:81:21)
console.ts:137 [Extension Host] (node:36568) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
t.log @ console.ts:70
TMScopeRegistry.ts:45 Overwriting grammar scope name to file mapping for scope source.lua.
Old grammar file: file:///c%3A/Users/Brandon/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/lua/syntaxes/lua.tmLanguage.json.
New grammar file: file:///c%3A/Users/Brandon/.vscode/extensions/septh.wow-bundle-1.3.0/languages/grammars/lua.tmLanguage.json
register @ TMScopeRegistry.ts:43
workbench.html:1 A cookie associated with a cross-site resource at https://visualstudio.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
console.ts:137 [Extension Host] rejected promise not handled within 1 second: Error: Language client is not ready yet
t.log @ console.ts:70
console.ts:137 [Extension Host] stack trace: Error: Language client is not ready yet at LanguageClient.sendNotification (/home/brandon/.vscode-server/extensions/nwolverson.ide-purescript-0.23.2/node_modules/vscode-languageclient/lib/client.js:1814:19) at Delayer.task (/home/brandon/.vscode-server/extensions/nwolverson.ide-purescript-0.23.2/node_modules/vscode-languageclient/lib/client.js:455:46) at /home/brandon/.vscode-server/extensions/nwolverson.ide-purescript-0.23.2/node_modules/vscode-languageclient/lib/utils/async.js:26:35
t.log @ console.ts:70
mainThreadExtensionService.ts:65 [[object Object]]Language client is not ready yet
$onExtensionRuntimeError @ host.ts:10
mainThreadExtensionService.ts:66 Error: Language client is not ready yet
at LanguageClient.sendNotification (/home/brandon/.vscode-server/extensions/nwolverson.ide-purescript-0.23.2/node_modules/vscode-languageclient/lib/client.js:1814)
at Delayer.task (/home/brandon/.vscode-server/extensions/nwolverson.ide-purescript-0.23.2/node_modules/vscode-languageclient/lib/client.js:455)
at /home/brandon/.vscode-server/extensions/nwolverson.ide-purescript-0.23.2/node_modules/vscode-languageclient/lib/utils/async.js:26
$onExtensionRuntimeError @ host.ts:10
notificationsAlerts.ts:40 Command 'PureScript: Restart/Reconnect purs IDE server' resulted in an error (Running the contributed command: 'purescript.restartPscIde' failed.)
onDidChangeNotification @ notificationsAlerts.ts:36
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Brandon/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/semver-umd.js.map:
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Brandon/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/index.js.map:
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Brandon/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/xterm.js.map:
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Brandon/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/xterm-addon-unicode11.js.map:
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Brandon/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/xterm-addon-search.js.map:
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Brandon/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/ExperimentationService.js.map:
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Brandon/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/TasApiFeatureProvider.js.map:
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Brandon/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/FilteredFeatureProvider.js.map:
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Brandon/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/BaseFeatureProvider.js.map:
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Brandon/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/AxiosHttpClient.js.map:
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Brandon/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/ExperimentationServiceAutoPolling.js.map:
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Brandon/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/ExperimentationServiceBase.js.map:
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Brandon/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/MemoryKeyValueStorage.js.map:
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Brandon/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/PollingService.js.map:
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Brandon/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/main.js.map:
notificationsAlerts.ts:40 Command 'PureScript: Restart/Reconnect purs IDE server' resulted in an error (Running the contributed command: 'purescript.restartPscIde' failed.)
onDidChangeNotification @ notificationsAlerts.ts:36
(anonymous) @ breadcrumbsModel.ts:294
fire @ event.ts:584
addNotification @ notifications.ts:169
error @ breakpointWidget.ts:389
accept @ commandsQuickAccess.ts:161
async function (async)
accept @ commandsQuickAccess.ts:91
(anonymous) @ pickerQuickAccess.ts:164
fire @ event.ts:584
(anonymous) @ quickInput.ts:730
fire @ event.ts:584
(anonymous) @ quickInput.ts:1233
For clarity I meant the vscode output window, see "View: Toggle Output" and pick the "IDE PureScript" output - that is the primary source of logging/debug information, and should contain less unrelated junk - the relvant part I see above is just
mainThreadExtensionService.ts:66 Error: Language client is not ready yet
at LanguageClient.sendNotification (/home/brandon/.vscode-server/extensions/nwolverson.ide-purescript-0.23.2/node_modules/vscode-languageclient/lib/client.js:1814)
(unless I miss something?)
Ah, I see. After doing a reload window, this is the sort of thing I see (I don't see anything additional if I try to issue a command to restart the purs ide server):
Launching new language client for file:///wd
[Info - 8:15:02 PM] {"processId":19958,"clientInfo":{"name":"vscode","version":"1.49.3"},"rootPath":"/wd","rootUri":"file:///wd","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional"},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"executeCommand":{"dynamicRegistration":true},"configuration":true,"workspaceFolders":true},"textDocument":{"publishDiagnostics":{"relatedInformation":true,"versionSupport":false,"tagSupport":{"valueSet":[1,2]}},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}},"contextSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true},"codeAction":{"dynamicRegistration":true,"isPreferredSupport":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"selectionRange":{"dynamicRegistration":true},"callHierarchy":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":true,"tokenTypes":["comment","keyword","number","regexp","operator","namespace","type","struct","class","interface","enum","typeParameter","function","member","macro","variable","parameter","property","label"],"tokenModifiers":["declaration","documentation","static","abstract","deprecated","async","readonly"]}},"window":{"workDoneProgress":true}},"initializationOptions":{"executeCommandProvider":false},"trace":"off","workspaceFolders":[{"uri":"file:///wd","name":"wd"}]}
Starting with args: ["/home/brandon/.vscode-server/bin/2af051012b66169dde0c4dfae3f5ef48f787ff69/node","/home/brandon/.vscode-server/extensions/nwolverson.ide-purescript-0.23.2/node_modules/purescript-language-server/server.js","--node-ipc","--clientProcessId=19958"]
Starting with cwd: /wd and using root path: /wd
Activated lc for file:///wd
Got new config (client push)
[Info - 8:15:02 PM] Starting IDE server
[Info - 8:15:02 PM] Using sources from psc-package/spago packages (PURS_IDE_SOURCES not set)
PureScript Language Server started
[Info - 8:15:05 PM] Resolved IDE server paths (npm-bin: true) from PATH of /wd/node_modules/.bin:/home/brandon/.vscode-server/bin/2af051012b66169dde0c4dfae3f5ef48f787ff69/bin:/opt/bin:/opt/purescript:/opt/psc-package:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin (1st is used):
[Info - 8:15:05 PM] /wd/node_modules/.bin/purs: 0.13.8
[Info - 8:15:05 PM] /opt/purescript/purs: 0.13.8
[Warn - 8:15:05 PM] Found multiple IDE server executables; using /wd/node_modules/.bin/purs
[Info - 8:15:05 PM] Found existing port from file: 15261
[Info - 8:15:05 PM] Starting IDE server on port 15420 with cwd /wd
Started IDE server (port 15420)
[Info - 8:15:05 PM] Retrying starting server after 500ms: Error: connect ECONNREFUSED 127.0.0.1:15420
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1134:16)
[Info - 8:15:05 PM] Retrying starting server after 500ms: Error: connect ECONNREFUSED 127.0.0.1:15420
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1134:16)
[Info - 8:15:06 PM] Retrying starting server after 500ms: Error: connect ECONNREFUSED 127.0.0.1:15420
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1134:16)
[Info - 8:15:06 PM] Retrying starting server after 500ms: Error: connect ECONNREFUSED 127.0.0.1:15420
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1134:16)
[Info - 8:15:07 PM] Retrying starting server after 500ms: Error: connect ECONNREFUSED 127.0.0.1:15420
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1134:16)
[Info - 8:15:07 PM] Retrying starting server after 500ms: Error: connect ECONNREFUSED 127.0.0.1:15420
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1134:16)
/home/brandon/.vscode-server/extensions/nwolverson.ide-purescript-0.23.2/node_modules/purescript-language-server/server.js:2813
throw util.fromLeft(step);
^
Error: connect ECONNREFUSED 127.0.0.1:15420
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1134:16) {
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 15420
}
[Error - 8:15:08 PM] Connection to server got closed. Server will not be restarted.
When I first tried this, it worked! I decided to close the editor and open it up again, and sadly, it did not work that time.
The sort of error message I get when trying to tell VS code to talk to the server is:
Possibly relevant info: I'm using the Remote Containers extension from Microsoft to connect to a docker container. The docker container is started in WSL2, though I don't think that is particularly relevant. The
settings.json
file is:I also added
.devcontainer/devcontainer.json
to save some extensions:The project is open source (commit link); unfortunately I don't currently have access to other graphical systems where I could test this at the moment (unless I want a COVID test to go into the office!).