Closed omentic closed 12 months ago
What makes you think that? There's no hard coded path and NimLSP tries to find Nim itself during compilation.
guh - I thought I had built and installed nimlsp from source, against Nim 2.0.0 source: but nimble appears to be silently failing to install it? I'm going to go figure out what's going on, terribly sorry for the inconvenience...
Hmm, nimble should be able to install it properly. But maybe your PATH isn't set up correctly? Nimble installs things in a special folder which you need to put in your PATH. If you're on a Linux (or possibly Mac) system you can use which nimlsp
to see the folder your OS thinks NimLSP is in. If it isn't in ~/.nimble/bin
then it's not the Nimble installed version.
Hmm. ~/.nimble/bin
is definitely on my path, and I saw no evidence of any nimlsp
binaries or code anywhere in the ~/.nimble
folder... I did eventually give up debugging it and just manually built and copied in the binaries to ~/.nimble/bin
:-/
Hmm that's strange. So nimble install nimlsp
doesn't throw an error but NimLSP doesn't end up in that folder?
Yup.
[apropos@arch ~]$ nimble -d:explicitSourcePath=/home/apropos/Projects/nim/nim-2.0.0 install nimlsp
Downloading https://github.com/PMunch/nimlsp using git
Verifying dependencies for nimlsp@0.4.6
Info: Dependency on jsonschema@>= 0.2.1 already satisfied
Verifying dependencies for jsonschema@0.2.1
Info: Dependency on ast_pattern_matching@any version already satisfied
Verifying dependencies for ast_pattern_matching@1.0.0
Info: Dependency on asynctools@>= 0.1.1 already satisfied
Verifying dependencies for asynctools@0.1.1
[apropos@arch ~]$ fd nimlsp ~/.nimble/
[apropos@arch ~]$
Very strange! Could you run echo $NIMBLE_DIR
to verify that it is in fact ~/.nimble
or empty on your machine?
Yup, it's empty. I might try and spin up a VM or something and see if it's reproducible...
Appears to be reproducible.
[apropos@harold ~]$ nimble install -d:explicitSourcePath=/home/apropos/nim-2.0.0 nimlsp
Downloading https://github.com/PMunch/nimlsp using git
Verifying dependencies for nimlsp@0.4.6
Info: Dependency on jsonschema@>= 0.2.1 already satisfied
Verifying dependencies for jsonschema@0.2.1
Info: Dependency on ast_pattern_matching@any version already satisfied
Verifying dependencies for ast_pattern_matching@1.0.0
Info: Dependency on asynctools@>= 0.1.1 already satisfied
Verifying dependencies for asynctools@0.1.1
[apropos@harold ~]$ ls ~/.nimble/bin
ls: cannot access '/home/apropos/.nimble/bin': No such file or directory
[apropos@harold ~]$ ls ~/.nimble
nimbledata2.json packages_official.json packages_temp.json pkgs2
[apropos@harold ~]$ ls ~/.nimble/pkgs2
ast_pattern_matching-1.0.0-e7d2f92c1a3390b4b2da00e021baf14b91ff5017 jsonschema-0.2.1-8ae2ef3c6c97e9bf2fdf650436adf512ba2f5991
asynctools-0.1.1-3f7096335282f45ebab49b939b20a1ed52cdec31
[apropos@harold ~]$
Very strange, I think this should be raised with nimble. Maybe also attach a run with --verbose
The default "path" argument is
~/.choosenim/toolchains/nim-1.6.6
. With the release of Nim 2.0.0, this should probably be changed.Ideally it wouldn't rely on hard-coding a version, path, and specific installation manager... but I suppose there's no better way, is there?