-
Notifications
You must be signed in to change notification settings - Fork 46
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
Trigger validation properly after file movement/rename #387
Comments
Not sure why but when I open and closed VSCode again, it seems ok now? But then when I move files around while I'm in VSCode, the error reappears? |
@honestbonsai Hi! I noticed this issue happens only while moving files around (rename, move to different folder). In my case, just making a modification to the file removes the error lines (since it re-triggers validation). Can you validate that you get the same behavior? in that case, we can relabel the issue to something like "Trigger validation properly after file movement/rename". The npm alias for packages e.g. |
@antico5 I can confirm what you just said. I did the following:
I agree with your idea for the relabeling to "Trigger validation properly after file movement/rename". Thanks for the help! |
@honestbonsai Thank you for reporting! we will address it as soon as possible. |
Just bumped into this bug as well. It's quite a blocker when writing tests with Forge!
Reloading the VSCode windows makes the bug go away, however. |
@PaulRBerg are you encountering that error when you move/rename files or is it happening in another context? |
@kanej hard to pin it down, but I know for certain that it also happened after updating my submodules. |
@PaulRBerg we suspect we are not updating the foundry project metadata against new (#416) and renamed files (#417) within the foundry project (at least that is our current working theory). We will be looking into both those issues this week. |
I have the following folder structure:
I'm doing
import "hardhat/console.sol";
in all of the solidity files, however they only work infolder2
, and do not work infolder1.1
,folder1.2
.I get the following error for all solidity files in
folder1.1
andfolder1.2
:If I change the import for
folder1.1
to../../../node_modules/hardhat/console.sol
, the error from VSCode goes away.I also do
import 'openzeppelin-contracts-06/math/SafeMath.sol';
in the solidity files infolder1
and get the error:In my
package.json
, I have the alias foropenzeppelin-contracts-06
My tests still run fine and everything compiles, I just get the red underlines and errors from VSCode.
The text was updated successfully, but these errors were encountered: