-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Tests aren't recompiled when one of their imports changes #188
Comments
this is definitely an ethers-solc issue, and you're probably right with your diagnosis. |
there were some ethers-solc changes yesterday that are already included on foundry master, so just to clarify this happens with the current master as well @jparklev ? |
Actually I think i'm behind by a day or two, let me try with the latest @mattsse. brb |
Confirmed on current master 👍 |
fixed in 0527eb9 / gakonst/ethers-rs#634, closing optimistically, please re-open if still a problem |
includes gakonst/ethers-rs#634 which fixes foundry-rs/foundry#188
includes gakonst/ethers-rs#634 which fixes foundry-rs/foundry#188
The Problem
When running tests using
forge test
, an update to the contracts imported by the tests doesn't trigger recompilations for the tests. For example, if we have a test filetest.t.sol
:Then we update the implementation of
lad.flip()
to return321
rather than123
, the tests still pass on the nextforge test
since thetest.t.sol
didn't recompile. Changing anything in the test file triggers a recompilation and then the tests fail as expected.Possible Solution
My understanding is that this has to do with the way
ethers-rs
is caching and deciding when a file needs to be recompiled. A solution might be invalidate cached files if a) their source has changed, or b) the source of any of their imports has changed. I could be missing something about what ethers is doing atm, though. Haven't gotten into that src much yet.Also lemme know if you'd like to push this issue over the the ethers repo for better tracking.
The text was updated successfully, but these errors were encountered: