-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
feat(forge): optimize compilation through preprocessing and caching #10010
base: master
Are you sure you want to change the base?
Conversation
added working on adding depending on the edited file the results are mixed in impact but always more favorable with test caching enabled |
For
The diff (with / without test caching) being limited to:
Alternatively:
Can also just be a side effect of how the codebase is set up with very deep hierarchies |
Yeah, most probably many mocks aka contracts under test that extend contracts under src, like for example contract BatchTestProcedures is Test, DeployUtils, FfiUtils, DefaultMarketInput where
You can check all the files marked as mock in cache file |
they also have |
Let me know if there's sth I can help with on the aave side. I suspect the problem is though that we essentially deploy the whole protocol + periphery on every test, which is not trivial to change. |
Motivation
cache_tests
to avoid unnecessary test compilation. Available also asforge build --cache-tests
, conflicts with--no-cache
TODO
Lock.lock();
at PoolManager.sol#L107amountOut < minAmountOut
at PSM3.sol#L125if (assets < 0)
at MorphoBundler.sol#L106require(assets != 0, ErrorsLib.ZERO_ASSETS)
at Morpho.sol#L424if (cliffTime < 0)
at SablierLockup.sol#L480Solution
PR Checklist