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

Import statements not recognized in projects in symlinked folders #512

Closed
TomiOhl opened this issue Aug 1, 2023 · 4 comments
Closed

Import statements not recognized in projects in symlinked folders #512

TomiOhl opened this issue Aug 1, 2023 · 4 comments

Comments

@TomiOhl
Copy link

TomiOhl commented Aug 1, 2023

There is no auto-completion for import statements and clicking on the does not navigate to the source file.
image
Happens with both npm and local imports. Tried in different projects.
Note that navigation between files works when I reference other contracts elsewhere in the code, just not when clicking on the import statements themselves.

hardhat-vscode 0.7.3
vscode 1.80.2
node v18.16.0
elementary OS 7 (based on Ubuntu 22.04)

@kanej
Copy link
Member

kanej commented Aug 4, 2023

Hey @TomiOhl, is this running in a Hardhat project or Foundry.

Is the repo open source to help me reproduce?

@TomiOhl
Copy link
Author

TomiOhl commented Aug 4, 2023

It's basically any project that I open. I'm using hardhat.
An example: https://github.com/agoraxyz/guild-pin-contract

Actually I wrote this in the text of the issue:

Note that navigation between files works when I reference other contracts elsewhere in the code, just not when clicking on the import statements themselves.

Atm this is also false, I cannot navigate between files even when ctrl+clicking contracts referenced elsewhere in the code. It did work at the time of writing the issue though. I don't think anything related changed, but I did close vs code since then and even rebooted the device once.

@TomiOhl TomiOhl changed the title Import statements not recognized Import statements not recognized in projects in symlinked folders Aug 4, 2023
@TomiOhl
Copy link
Author

TomiOhl commented Aug 4, 2023

Did an experiment: normally the projects I work on are in a folder that's symlinked to my home folder from another partition. However, after copying a project to my home folder directly, the issue no longer persists. Hence I updated the title, too.
Note: Juan Blanco's Solidity extension supports symlinked folders, too

@kanej
Copy link
Member

kanej commented Aug 9, 2023

Hey @TomiOhl. This is known issue: #270

We have an issue with our Hardhat analysis (which leverages node process spawning and that doesn't work well with symlinks).

I am going to close this issue in preference for #270.

@kanej kanej closed this as not planned Won't fix, can't repro, duplicate, stale Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants