Skip to content
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

Error: spawn slither-lsp ENOENT (PATH issue) #52

Open
shortdoom opened this issue Apr 15, 2024 · 6 comments
Open

Error: spawn slither-lsp ENOENT (PATH issue) #52

shortdoom opened this issue Apr 15, 2024 · 6 comments

Comments

@shortdoom
Copy link

shortdoom commented Apr 15, 2024

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.

contract-explorer

@frabert
Copy link
Collaborator

frabert commented Apr 16, 2024

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

@shortdoom
Copy link
Author

Like so?

contract-explorer.webm

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.

@frabert
Copy link
Collaborator

frabert commented Apr 16, 2024

There's a notification in the bottom right that compilation of the workspace has failed. That's probably the issue.

@shortdoom
Copy link
Author

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).

@shortdoom
Copy link
Author

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.

contract-explorer2.webm

@frabert
Copy link
Collaborator

frabert commented Apr 16, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants