-
Notifications
You must be signed in to change notification settings - Fork 135
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
Running tests with dirty cache always fails #796
Comments
I had a similar issue, some tests failing with mysterious errors, and only deleting zkout (and cache_forge?) helped. |
Hey! Could you provide a repository with the tests and the |
Sure, the repo is https://github.com/drips-network/contracts, branch |
Hey @CodeSandwich! I am trying to reproduce the error. I am able to run the tests multiple times without failures using your commit and the latest commit from Foundry-zksync. Are you using the latest release or a particular commit? Screen.Recording.2025-01-02.at.11.59.57.AM.mov |
That's weird, I'm pretty sure that the behavior is different despite me using the exactly same tooling on code from the same commit. Just running the tests twice doesn't fail the second time anymore. Zksync (not solc) compiles the code again on each run which is slow and feels excessive, but I can't recall it doing that when the issue was present, maybe that's the key? I can still reproduce the issue when the code is modified though and solc needs to recompile some of the contracts:
Edit: tested this again using version 2025-01-03 and it's exactly the same as on 2024-12-19. |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.0.2 (1781234 2024-12-19T00:26:29.308590729Z)
What command(s) is the bug in?
forge test
Operating System
Linux
Describe the bug
Running
forge test
always fails unlessforge clean && rm -rf zkout
is run to completely wipe any cache. Runningforge build
works fine, but it doesn't fix the tests. An example output after runningforge build
, so there's nothing to compile anymore:The text was updated successfully, but these errors were encountered: