I just found one of my 3 projects shows warnings like this https://github.com/Cirru/parser.purs . While the same VS code works correctly in other 2 projects. Tried restarting many times and there are still same warning on every PureScript file inside this project.
got some logs from VS Code output:
[Info - 1:55:54 AM] /usr/local/bin/purs: 0.14.0
[Warn - 1:55:54 AM] Found multiple IDE server executables; using /Users/chen/.config/yarn/global/node_modules/.bin/purs
[Info - 1:55:54 AM] Starting IDE server on port 15995 with cwd /Users/chen/repo/cirru/parser.purs
Started IDE server (port 15995)
[Info - 1:55:54 AM] Retrying starting server after 500ms: Error: connect ECONNREFUSED 127.0.0.1:15995
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
[Info - 1:55:55 AM] [Info] cachedb was changed from: Nothing, to: Just 2021-04-06 17:55:17.705537979 UTC @(main:Command.Ide app/Command/Ide.hs:205:25)
[Info - 1:55:57 AM] [Error] Version mismatch for the externs at: /Users/chen/repo/cirru/parser.purs/output/Data.Ord.Unsafe/externs.cbor Expected: 0.14.0 Found: 0.13.8
[Info - 1:55:57 AM] Non-fatal error loading modules: Version mismatch for the externs at: /Users/chen/repo/cirru/parser.purs/output/Data.Ord.Unsafe/externs.cbor Expected: 0.14.0 Found: 0.13.8
Built with 9/9 issues for file: "/Users/chen/repo/cirru/parser.purs/test/Main.purs", all diagnostic files: ["/Users/chen/repo/cirru/parser.purs/test/Main.purs"]
(Just { textDocument: { codeAction: { codeActionLiteralSupport: { codeActionKind: { valueSet: [CodeActionKind ,CodeActionKind quickfix,CodeActionKind refactor,CodeActionKind refactor.extract,CodeActionKind refactor.inline,CodeActionKind refactor.rewrite,CodeActionKind source,CodeActionKind source.organizeImports] } }, isPreferredSupport: true } }, workspace: { applyEdit: true, workspaceEdit: { documentChanges: true } } })
Literals supported: (Just true)
the errors look quite similar to ModuleNotFound error in vscode-ide-purescript but I tried reloading many times, it doesn’t work.
I also wondering if purs compile
is involved in this process when I press “Command s” and it checks the code, since the docs mentioned about it. But as I tried, my other projects will show “module not found” errors as well, I guess this command is not used in this way…
pity that there’s not more information about why the connection failed. I can always find the process running but it cannot be connected to:
[Info - 1:55:54 AM] Retrying starting server after 500ms: Error: connect ECONNREFUSED 127.0.0.1:15995
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
I also tried PureScript: Build
it seems to work fine and it eliminates the errors generated by pressing “Save”.