When editing files in repos with spaces in the path, the laguage server fails with the following error in Puppet output:
This causes linting to fail, so no code problems are shown for the workspace in Puppet files, while they are shown for other types of file.
Additionally, hovering over Puppet code whether there are spaces in the path or not, gives the following error in Log (Extension Host):
I think this may be a diversion from the main issue, though, as these hover errors are shown whether the language server fails or not.
The language server should cope with spaces in the path to the files.
I've uninstalled VS Code, and reinstalled it for my user, and uninstalled puppet-vscode (and deleted the puppet-vscode folder from extensions) then reinstalled that. No change.
I, [2020-09-10T16:05:57.804569 #11888] INFO -- : Language Server is v0.26.1
D, [2020-09-10T16:05:58.137558 #11888] DEBUG -- : Loading gems...
I, [2020-09-10T16:06:31.204211 #11888] INFO -- : Using Puppet v6.17.0
D, [2020-09-10T16:06:31.529368 #11888] DEBUG -- : Detected additional puppet settings []
I, [2020-09-10T16:06:31.807751 #11888] INFO -- : Initializing Puppet Helper...
D, [2020-09-10T16:06:31.863490 #11888] DEBUG -- : Initializing Document Store...
I, [2020-09-10T16:06:31.917256 #11888] INFO -- : Initializing settings...
I, [2020-09-10T16:06:31.981634 #11888] INFO -- : Starting RPC Server...
I, [2020-09-10T16:06:31.992845 #11888] INFO -- : Using Facter v4.0.30
D, [2020-09-10T16:06:32.046823 #11888] DEBUG -- : Using STDIO Server
I, [2020-09-10T16:06:32.085747 #11888] INFO -- : Preloading Puppet Types (Async)...
D, [2020-09-10T16:06:32.160581 #11888] DEBUG -- : STDIOSRV: Starting STDIO server...
I, [2020-09-10T16:06:32.167457 #11888] INFO -- : Preloading Facter (Async)...
D, [2020-09-10T16:06:32.213306 #11888] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":41072,"rootPath":"d:\\test module","rootUri":"file:///d%3A/test%20module","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},"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},"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}}},"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,"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},"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}}},"trace":"off","workspaceFolders":[{"uri":"file:///d%3A/test%20module","name":"test module"}]}}
---
D, [2020-09-10T16:06:32.212293 #11888] DEBUG -- : SidecarQueue Thread: Running sidecar ["ruby", "c:/Users/Iain/.vscode/extensions/puppet.puppet-vscode-0.28.0/vendor/languageserver/puppet-languageserver-sidecar", "--action", "default_types", "--puppet-version=6.17.0"]
I, [2020-09-10T16:06:32.256637 #11888] INFO -- : Preloading Functions (Async)...
D, [2020-09-10T16:06:32.290291 #11888] DEBUG -- : SidecarQueue Thread: Running sidecar ["ruby", "c:/Users/Iain/.vscode/extensions/puppet.puppet-vscode-0.28.0/vendor/languageserver/puppet-languageserver-sidecar", "--action", "facts", "--puppet-version=6.17.0"]
D, [2020-09-10T16:06:32.291502 #11888] DEBUG -- : Received initialize method
I, [2020-09-10T16:06:32.356801 #11888] INFO -- : Preloading Classes (Async)...
D, [2020-09-10T16:06:32.473478 #11888] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","id":0,"result":{"capabilities":{"textDocumentSync":1,"hoverProvider":true,"completionProvider":{"resolveProvider":true,"triggerCharacters":[">","$","[","="]},"definitionProvider":true,"documentSymbolProvider":true,"workspaceSymbolProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]}}}}
---
I, [2020-09-10T16:06:32.545732 #11888] INFO -- : Preloading DataTypes (Async)...
D, [2020-09-10T16:06:32.602329 #11888] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","method":"initialized","params":{}}
---
I, [2020-09-10T16:06:32.697291 #11888] INFO -- : Preloading static data (Async)...
I, [2020-09-10T16:06:32.800807 #11888] INFO -- : Client has received initialization
D, [2020-09-10T16:06:33.029952 #11888] DEBUG -- : Importing static data file c:/Users/Iain/.vscode/extensions/puppet.puppet-vscode-0.28.0/vendor/languageserver/lib/puppet-languageserver/static_data/bolt-aggregate.json...
I, [2020-09-10T16:06:33.084471 #11888] INFO -- : Attempting to dynamically register the workspace/didChangeConfiguration method with id fc95383a-9859-45db-9aff-2036880df77c
D, [2020-09-10T16:06:33.115577 #11888] DEBUG -- : Importing static data file c:/Users/Iain/.vscode/extensions/puppet.puppet-vscode-0.28.0/vendor/languageserver/lib/puppet-languageserver/static_data/bolt-boltlib.json...
D, [2020-09-10T16:06:33.196158 #11888] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","id":0,"method":"client/registerCapability","params":{"registrations":[{"id":"fc95383a-9859-45db-9aff-2036880df77c","registerOptions":{},"method":"workspace/didChangeConfiguration"}]}}
---
D, [2020-09-10T16:06:33.369639 #11888] DEBUG -- : Importing static data file c:/Users/Iain/.vscode/extensions/puppet.puppet-vscode-0.28.0/vendor/languageserver/lib/puppet-languageserver/static_data/bolt-canary.json...
D, [2020-09-10T16:06:33.394988 #11888] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///d%3A/test%20module/manifests/init.pp","languageId":"puppet","version":1,"text":"class test_module {}\r\n"}}}
---
D, [2020-09-10T16:06:33.502206 #11888] DEBUG -- : Importing static data file c:/Users/Iain/.vscode/extensions/puppet.puppet-vscode-0.28.0/vendor/languageserver/lib/puppet-languageserver/static_data/bolt-ctrl.json...
I, [2020-09-10T16:06:33.566080 #11888] INFO -- : Received textDocument/didOpen notification.
D, [2020-09-10T16:06:33.616228 #11888] DEBUG -- : Importing static data file c:/Users/Iain/.vscode/extensions/puppet.puppet-vscode-0.28.0/vendor/languageserver/lib/puppet-languageserver/static_data/bolt-file.json...
D, [2020-09-10T16:06:33.681724 #11888] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","id":1,"method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///d%3A/test%20module/manifests/init.pp"}}}
---
E, [2020-09-10T16:06:33.776223 #11888] ERROR -- : Error in ValidationQueue Thread: Invalid argument @ dir_chdir - 'd:\test module'
D, [2020-09-10T16:06:33.854509 #11888] DEBUG -- : Importing static data file c:/Users/Iain/.vscode/extensions/puppet.puppet-vscode-0.28.0/vendor/languageserver/lib/puppet-languageserver/static_data/bolt-out.json...
D, [2020-09-10T16:06:33.913264 #11888] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","id":1,"result":[{"children":[],"detail":"test_module","kind":5,"selectionRange":{"start":{"line":0,"character":0},"end":{"line":0,"character":20}},"name":"test_module","range":{"start":{"line":0,"character":0},"end":{"line":0,"character":20}}}]}
---
D, [2020-09-10T16:06:34.103175 #11888] DEBUG -- : Importing static data file c:/Users/Iain/.vscode/extensions/puppet.puppet-vscode-0.28.0/vendor/languageserver/lib/puppet-languageserver/static_data/bolt-puppetdb_fact.json...
D, [2020-09-10T16:06:34.109593 #11888] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","id":0,"result":null}
---
D, [2020-09-10T16:06:34.133781 #11888] DEBUG -- : Importing static data file c:/Users/Iain/.vscode/extensions/puppet.puppet-vscode-0.28.0/vendor/languageserver/lib/puppet-languageserver/static_data/bolt-system.json...
I, [2020-09-10T16:06:34.181320 #11888] INFO -- : Succesfully dynamically registered the workspace/didChangeConfiguration method
D, [2020-09-10T16:06:34.224080 #11888] DEBUG -- : Static bolt data returned 40 functions
D, [2020-09-10T16:06:34.269332 #11888] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","id":1,"method":"workspace/configuration","params":{"items":[{"section":"puppet"}]}}
---
D, [2020-09-10T16:06:34.351215 #11888] DEBUG -- : Static bolt data returned 6 datatypes
D, [2020-09-10T16:06:34.582336 #11888] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","id":2,"method":"puppet/getVersion","params":null}
---
D, [2020-09-10T16:06:34.638630 #11888] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","id":2,"result":{"typesLoaded":false,"classesLoaded":false,"puppetVersion":"6.17.0","facterVersion":"4.0.30","languageServerVersion":"0.26.1","factsLoaded":false,"functionsLoaded":false}}
---
D, [2020-09-10T16:06:34.702755 #11888] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","id":1,"result":[{"editorService":{"enable":true,"debugFilePath":"D:\\Puppet-log.txt","featureFlags":[],"formatOnType":{"enable":false},"hover":{"showMetadataInfo":true},"loglevel":"debug","protocol":"stdio","puppet":{"confdir":"","environment":"","modulePath":"","vardir":"","version":""},"tcp":{"address":"","port":0},"timeout":10},"validate":{"resolvePuppetfiles":true},"format":{"enable":true},"installDirectory":"","installType":"auto","notification":{"nodeGraph":"messagebox","puppetResource":"messagebox"},"pdk":{"checkVersion":true},"titleBar":{"pdkNewModule":{"enable":true}}}]}
---
D, [2020-09-10T16:06:34.767567 #11888] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","id":3,"method":"puppet/getVersion","params":null}
---
D, [2020-09-10T16:06:34.999247 #11888] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","id":3,"result":{"typesLoaded":false,"classesLoaded":false,"puppetVersion":"6.17.0","facterVersion":"4.0.30","languageServerVersion":"0.26.1","factsLoaded":false,"functionsLoaded":false}}
---
D, [2020-09-10T16:06:35.977726 #11888] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","id":4,"method":"puppet/getVersion","params":null}
---
D, [2020-09-10T16:06:36.171617 #11888] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","id":4,"result":{"typesLoaded":false,"classesLoaded":false,"puppetVersion":"6.17.0","facterVersion":"4.0.30","languageServerVersion":"0.26.1","factsLoaded":false,"functionsLoaded":false}}
---
D, [2020-09-10T16:06:36.617840 #11888] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","id":5,"method":"puppet/getVersion","params":null}
---
D, [2020-09-10T16:06:36.736124 #11888] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","id":5,"result":{"typesLoaded":false,"classesLoaded":false,"puppetVersion":"6.17.0","facterVersion":"4.0.30","languageServerVersion":"0.26.1","factsLoaded":false,"functionsLoaded":false}}
---
D, [2020-09-10T16:06:37.617415 #11888] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","id":6,"method":"puppet/getVersion","params":null}
---
D, [2020-09-10T16:06:37.687029 #11888] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","id":6,"result":{"typesLoaded":false,"classesLoaded":false,"puppetVersion":"6.17.0","facterVersion":"4.0.30","languageServerVersion":"0.26.1","factsLoaded":false,"functionsLoaded":false}}
---
D, [2020-09-10T16:06:38.710847 #11888] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","id":7,"method":"puppet/getVersion","params":null}
---
D, [2020-09-10T16:06:38.811560 #11888] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","id":7,"result":{"typesLoaded":false,"classesLoaded":false,"puppetVersion":"6.17.0","facterVersion":"4.0.30","languageServerVersion":"0.26.1","factsLoaded":false,"functionsLoaded":false}}
---
D, [2020-09-10T16:06:39.636293 #11888] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","id":8,"method":"puppet/getVersion","params":null}
---
D, [2020-09-10T16:06:39.718949 #11888] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","id":8,"result":{"typesLoaded":false,"classesLoaded":false,"puppetVersion":"6.17.0","facterVersion":"4.0.30","languageServerVersion":"0.26.1","factsLoaded":false,"functionsLoaded":false}}
---
D, [2020-09-10T16:06:40.654498 #11888] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","id":9,"method":"puppet/getVersion","params":null}
---
D, [2020-09-10T16:06:40.805455 #11888] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","id":9,"result":{"typesLoaded":false,"classesLoaded":false,"puppetVersion":"6.17.0","facterVersion":"4.0.30","languageServerVersion":"0.26.1","factsLoaded":false,"functionsLoaded":false}}
---
D, [2020-09-10T16:06:41.637690 #11888] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","id":10,"method":"puppet/getVersion","params":null}
---
D, [2020-09-10T16:06:41.705282 #11888] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","id":10,"result":{"typesLoaded":false,"classesLoaded":false,"puppetVersion":"6.17.0","facterVersion":"4.0.30","languageServerVersion":"0.26.1","factsLoaded":false,"functionsLoaded":false}}
---
D, [2020-09-10T16:06:42.701315 #11888] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","id":11,"method":"puppet/getVersion","params":null}
---
D, [2020-09-10T16:06:42.799840 #11888] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","id":11,"result":{"typesLoaded":false,"classesLoaded":false,"puppetVersion":"6.17.0","facterVersion":"4.0.30","languageServerVersion":"0.26.1","factsLoaded":false,"functionsLoaded":false}}
---
D, [2020-09-10T16:06:43.716182 #11888] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","id":12,"method":"puppet/getVersion","params":null}
---
D, [2020-09-10T16:06:43.858799 #11888] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","id":12,"result":{"typesLoaded":false,"classesLoaded":false,"puppetVersion":"6.17.0","facterVersion":"4.0.30","languageServerVersion":"0.26.1","factsLoaded":false,"functionsLoaded":false}}
---
D, [2020-09-10T16:06:44.764662 #11888] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","id":13,"method":"puppet/getVersion","params":null}
---
D, [2020-09-10T16:06:45.007623 #11888] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","id":13,"result":{"typesLoaded":false,"classesLoaded":false,"puppetVersion":"6.17.0","facterVersion":"4.0.30","languageServerVersion":"0.26.1","factsLoaded":false,"functionsLoaded":false}}
---
D, [2020-09-10T16:06:45.774250 #11888] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","id":14,"method":"puppet/getVersion","params":null}
---
D, [2020-09-10T16:06:45.911239 #11888] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","id":14,"result":{"typesLoaded":false,"classesLoaded":false,"puppetVersion":"6.17.0","facterVersion":"4.0.30","languageServerVersion":"0.26.1","factsLoaded":false,"functionsLoaded":false}}
---
D, [2020-09-10T16:06:47.133749 #11888] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","id":15,"method":"puppet/getVersion","params":null}
---
D, [2020-09-10T16:06:47.390336 #11888] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","id":15,"result":{"typesLoaded":false,"classesLoaded":false,"puppetVersion":"6.17.0","facterVersion":"4.0.30","languageServerVersion":"0.26.1","factsLoaded":false,"functionsLoaded":false}}
---
D, [2020-09-10T16:06:47.545675 #11888] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","id":16,"method":"shutdown","params":null}
---
D, [2020-09-10T16:06:47.787561 #11888] DEBUG -- : Received shutdown method
D, [2020-09-10T16:06:47.924169 #11888] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","id":16,"result":null}
---
A, [2020-09-10T16:07:01.976453 #11888] ANY -- : SidecarQueue Thread: Calling sidecar with --action default_types --puppet-version=6.17.0 returned exitcode 0,
D, [2020-09-10T16:07:02.087526 #11888] DEBUG -- : SidecarQueue Thread: default_types returned 12 items
D, [2020-09-10T16:07:02.125725 #11888] DEBUG -- : SidecarQueue Thread: Running sidecar ["ruby", "c:/Users/Iain/.vscode/extensions/puppet.puppet-vscode-0.28.0/vendor/languageserver/puppet-languageserver-sidecar", "--action", "default_functions", "--puppet-version=6.17.0"]
A, [2020-09-10T16:07:02.445712 #11888] ANY -- : SidecarQueue Thread: Calling sidecar with --action facts --puppet-version=6.17.0 returned exitcode 0,
D, [2020-09-10T16:07:02.485778 #11888] DEBUG -- : SidecarQueue Thread: facts returned 84 items
D, [2020-09-10T16:07:02.525712 #11888] DEBUG -- : SidecarQueue Thread: Running sidecar ["ruby", "c:/Users/Iain/.vscode/extensions/puppet.puppet-vscode-0.28.0/vendor/languageserver/puppet-languageserver-sidecar", "--action", "default_classes", "--puppet-version=6.17.0"]
What Versions are you running?
OS Version: Windows 10 Pro version 1909 build 18363.1016
VSCode Version: 1.48.2 (user setup)
Puppet Extension Version: 0.28.0
PDK Version: 1.18.1
What You Are Seeing?
When editing files in repos with spaces in the path, the laguage server fails with the following error in Puppet output:
This causes linting to fail, so no code problems are shown for the workspace in Puppet files, while they are shown for other types of file.
Additionally, hovering over Puppet code whether there are spaces in the path or not, gives the following error in Log (Extension Host):
I think this may be a diversion from the main issue, though, as these hover errors are shown whether the language server fails or not.
What is Expected?
The language server should cope with spaces in the path to the files.
How Did You Get This To Happen? (Steps to Reproduce)
Tried with multiple repos, and a new module from PDK:
pdk new module test_moduletest_modulefolder, Open with Code.manifests/init.ppwith the contentclass test_module {}- Problems shows 1 warning, "class not documented".test_moduletotest module, Open with Code again.init.pp- no problems are shown. Ctrl-Shift-U and switch to Puppet - shows the EINVAL error.I verified this with test paths:
D:\Dropbox\Projects\Systems\puppet control= error, linting fails to show problemsD:\Dropbox\Projects\Systems\puppet-control= no error, linting shows problems when they are writtenD:\Test= no error, linting shows problems when they are writtenD:\Puppet control= error, linting fails to show problemsD:\Puppet-control= no error, linting shows problems when they are writtenD:\test module= error, linting fails to show problemsD:\test_module= no error, linting shows problems when they are writtenC:\test module= error, linting fails to show problemsC:\test_module= no error, linting shows problems when they are writtenI've uninstalled VS Code, and reinstalled it for my user, and uninstalled puppet-vscode (and deleted the puppet-vscode folder from extensions) then reinstalled that. No change.
Output Log
Puppet Output pane:
Debug log: