contract-explorer
contract-explorer copied to clipboard
Error: spawn slither-lsp ENOENT (PATH issue)
Hey, just bringing it up to your attention.
This PR is still relevant. Extension has problem finding slither-lsp, even if echo $PATH
lists appropriate directories (and, slither-lsp
is installed). This happens for both global and venv active python interpreter.
The only way to run extension, for me, was to do the dev-installation and point to the specific slither-lsp server running. However, even with that, the currently released version seems to be missing some functionality. Below is the only visible display. Plugin doesn't seem to do anything else than just allowing to toggle options for detection filters.
Can you get to a state where running slither-lsp --help
in your terminal prints the expected message? If so, could you try running code /path/to/your/project
in that same terminal session?
the currently released version seems to be missing some functionality
The features that are currently implemented are mostly navigation features (right click to go to definition/implementation/references, show call/type hierarchy) and showing the SlithIR for functions
Like so?
It doesn't complain with any errors. I also tried setting debug level higher but the effect is the same. I don't see any of the features you mentioned as an option to select anywhere unfortunately.
There's a notification in the bottom right that compilation of the workspace has failed. That's probably the issue.
But why is that? I can compile fine outside of the extension with both slither and crytic-compile. And plugin still fails to work outside of the developer installation (from marketplace).
This is a PATH issue still I think. I changed to foundry repository outside of the regular directory with crytic.config.json
and it now successfully compiles for plugin. But, I still can't inspect call/type hierarchy nor there's nothing to do in the plugin sidebar.
You're still running slither-lsp in TCP mode. Have you tried my suggestions of running code
from the same venv where slither-lsp is installed?
Apart from that, I couldn't really see what was happening from the screen recording. What should be happening is the following: a notification showing "compilation for your-workspace
has started" and a second one telling that either the compilation was successful, or that there were errors compiling it. Until that notification shows, processing is still in progress and no features are available.