-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
utils.getElmVersion returns empty version #518
Comments
Something is weird with your elm executable, can you run
this usually shows the version in between |
Yes, just noticed as well. Trying to see if I can debug it. Cloned elm-language-client-vscode and trying to figure out what to do after running the project. |
This is the code, if you haven't found it already https://github.com/elm-tooling/elm-language-server/blob/master/src/elmWorkspace.ts#L333 |
OK, figured out that I have to open the project from the vscode instance that opens when debugging, dooh. But for some reason the breakpoint I set becomes unbound once debugging. |
You need to attach to the port 5010 (there is a debug config), you need to be in an elm file for the server to spin up, but it's hard to attach early enough. |
Server does spin up. I'm not very familiar with node js development. Do I have to attach debugger manually? |
You only have to attach a debugger cause we're running a client, which you will debug automatically, but also a server, which is a remote process. I'm sorry it should be port 6010, said that from memory |
That's before it returns, what's the actual return? |
{
command: "elm --version",
exitCode: 0,
stdout: "",
stderr: "",
failed: false,
timedOut: false,
isCanceled: false,
killed: false,
} |
So now the question is, why |
Installed it from https://github.com/elm/compiler/releases/download/0.19.1/installer-for-windows.exe I had Running |
I think I found the issue. Made a small snippet to test this. import execa from "execa";
const cwd = 'f:\\dev\\elm-spa-example';
const input = undefined;
const preferLocal = true;
const stripFinalNewLine = false;
function exec(cmd, args) {
try {
return execa.sync(cmd, args, {
cwd,
input,
preferLocal,
stripFinalNewLine
});
}
catch (exc) {
return exc;
}
}
const res = exec('elm', ['--version']);
console.log(res); vscode actually opens the Do we actually need the Goods news for me is that I can work around this by making change in the |
Right, I always recommend to not use Still, this is a new place to show this problem, as we just recently had to introduce that |
Yeah, I was just following the spa project instructions. |
Expected Behavior
Extension should work (look for Elm packages in right directory)utils.getElmVersion should return Elm version that is installed.
0.19.1
in this case.Current Behavior
UPDATED: Found that
utils.getElmVersion
is returning empty value instead of version.Opening the elm-spa-example project. The only thing that seems to work is syntax highlighting.
One of the first errors in output is
Error: ENOENT: no such file or directory, open 'C:\Users\janis\AppData\Roaming\elm\packages\NoRedInk\elm-json-decode-pipeline\1.0.0\elm.json'
The file is actually located in
C:\Users\janis\AppData\Roaming\elm\0.19.1\packages\NoRedInk\elm-json-decode-pipeline\1.0.0\elm.json
See the
0.19.1
version part.The weird thing is that it worked the first time I installed it (moments before I reinstalled it). Basically I installed the extension. It worked. Then noticed numbers next to elm files in file explorer and was wondering if that is extension feature or vscode feature (which I had just updated as well) as I couldn't understand what they meant. Fastest way to check from where the features comes? Uninstall extension. Uninstalled it, numbers were gone. Ok, so that is extensions feature. Installed it back and it doesn't work any more.
Then I found the
ENOENT
error and that I had two version folders insideAppData\Roaming\elm\packages\
-0.19.0
and0.19.1
.Uninstalled both Elm versions.
Deleted elm-spa-example project
Deleted elm folder in
AppData\Roaming
Installed Elm
0.19.1
Cloned project again and built it, but the path is still as
AppData\Roaming\elm\0.19.1\packages
Possible Solution
No solution, but seems that extensions is looking for packages in the wrong directory.
Your Environment
vscode info:
Version: 1.53.1 (system setup)
Commit: 5d424b828ada08e1eb9f95d6cb41120234ef57c7
Date: 2021-02-08T23:29:42.785Z
Electron: 11.2.1
Chrome: 87.0.4280.141
Node.js: 12.18.3 EDIT: Updated to v14.15.5
V8: 8.7.220.31-electron.0
OS: Windows_NT x64 10.0.17134
Full log
The text was updated successfully, but these errors were encountered: