-
Notifications
You must be signed in to change notification settings - Fork 50
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
Extension considers sol files not part of hardhat project if project path contains symlink #270
Comments
This also happens under certain circumstances (not yet entirely sure how to reproduce this reliably) when using |
@fubhy About the foundry + pnpm issue (copying my answer from slack): I've been investigating the symlink issue using the repo you shared (https://github.com/KedziaPawel/symlink-hardhat-bug). I've arrived to 2 conclusions:
Forge works on the provided settings because it uses the solc CLI instead of the json interface (which the extension uses). I tried the following json inputs for solidity < 0.8.8 to try and make it work without success: Both give the "file outside allowed directories" error. @SAPikachu I was able to reproduce the reported issue. Our extension does not behave as expected on hardhat project directories that are symlinked, because of the way we load the HRE for providing validation and other services ( |
This happens in fresh MUD projects too. Repro: pnpm create mud@canary app
# selected vanilla, but i'm pretty sure it's not relevant
code app And go to |
@alcuadrado suggested we investigate the library: https://www.npmjs.com/package/resolve, and whether it can help us with out node require resolution for pnpm. |
@kanej I wasn't able to crack it so far. These are my findings on the issue:
I'm sure there must be a simpler way of supporting symlinked directories. Perhaps we should look into how other language servers handle this. |
Thanks @antico5, I'll take it from here 👋 |
Any updates on this? |
Any update on this? |
No updates, we haven't progressed the investigation. |
I use symlink to point my development workspace to a synced folder. When I open a hardhat project inside the symlink, I got following error and intellisense doesn't work correctly:
If I open the same project directly inside the real path without symlink, intellisense works correctly.
Environment:
VSCode (note that I use SSH remote extension to work with project inside a VM):
VM:
The text was updated successfully, but these errors were encountered: