You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This only happens with vim-lsp environment. I cannot reproduce this issue on VSCode.
I confirmed the same behavior on VSCode as well. See repro steps.
Expected Behavior
ElmLS sends textDocument/publishDiagnostics to show an error
Current Behavior
No diagnostic appears.
Possible Solution
Possible reason of this issue is that elm-test cannot discover elm binary when it is installed locally, as vim-lsp logging says.
Mon Jul 18 02:21:21 2022:["<---",1,"elm-language-server",{"response":{"method":"window/logMessage","jsonrpc":"2.0","params":{"message":"{\"shortMessage\":\"Command failed with exit code 1: ./node_modules/.bin/elm-test make tests/Tests/Main.elm --report json\",\"command\":\"./node_modules/.bin/elm-test make tests/Tests/Main.elm --report json\",\"escapedCommand\":\"\\\"./node_modules/.bin/elm-test\\\" make \\\"tests/Tests/Main.elm\\\" --report json\",\"exitCode\":1,\"stdout\":\"\",\"stderr\":\"Cannot find elm executable, make sure it is installed.\\n(If elm is not on your path or is called something different the --compiler flag might help.)\\n\",\"failed\":true,\"timedOut\":false,\"isCanceled\":false,\"killed\":false}","type":2}}}]
Mon Jul 18 02:21:21 2022:["<---",1,"elm-language-server",{"response":{"method":"window/logMessage","jsonrpc":"2.0","params":{"message":"Received an invalid json, skipping error.","type":2}}}]
Mon Jul 18 02:21:21 2022:["<---",1,"elm-language-server",{"response":{"method":"window/logMessage","jsonrpc":"2.0","params":{"message":"Received an invalid json, skipping error.","type":2}}}]
Mon Jul 18 02:21:21 2022:["<---",1,"elm-language-server",{"response":{"method":"window/logMessage","jsonrpc":"2.0","params":{"message":"Received an invalid json, skipping error.","type":2}}}]
I have confirmed that using --compiler option when calling elm-test internally for the environment that has installed elm toolchains locally will fix this problem.
Environment name and version (e.g. node.js 5.4): Node.js v16.15.0
Operating System and version: Ubuntu WSL
The text was updated successfully, but these errors were encountered:
IzumiSy
changed the title
ElmLS does not send textDocument/publishDiagnostics when entrypoint module is depended by tests.
ElmLS does not send textDocument/publishDiagnostics when entrypoint module is depended by tests and elm-test is installed locally.
Jul 17, 2022
This only happens with vim-lsp environment. I cannot reproduce this issue on VSCode.I confirmed the same behavior on VSCode as well. See repro steps.
Expected Behavior
ElmLS sends
textDocument/publishDiagnostics
to show an errorCurrent Behavior
No diagnostic appears.
Possible Solution
Possible reason of this issue is that
elm-test
cannot discover elm binary when it is installed locally, as vim-lsp logging says.I have confirmed that using
--compiler
option when callingelm-test
internally for the environment that has installed elm toolchains locally will fix this problem.My opened PR is #729
Steps to Reproduce (for bugs)
0. Install elm, elm-test locally.
Then, update vim-lsp preference to use them.
For VSCode, use the following setting.

1. Create modules.
src/App.elm
src/Bar.elm
tests/Test/Main.elm
2. Update Bar.elm to raise a compile error
src/Bar.elm
Then, no error occurs, even though it must be.
Context
n/a
Your Environment
The text was updated successfully, but these errors were encountered: