-
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
Add profile specific caches #4522
Comments
You're correct that coverage builds with different settings (no optimizer, no via-ir). So perhaps a more generic feature request here is to automatically have a separate cache per-profile. This way you can maintain performance when switching between profiles without needing to manually set different out-dirs? Two ideas on how to do this:
|
Out, interesting, different out dirs could be set? I do see how the coverage step doesn't work with pre-building / using a cache. TBH we've managed to work around this issue & while it seems nice, I don't see it as incredibly important to us. |
cc @klkvr besides this being a significant breaking change do you see any blockers on the technical side? |
I don't think there are any blockers for separating cache/ and out/, though there will probably be blockers for making this to work for caching coverage compilation data. That's because we are relying on AST IDs in coverage which are getting messed up after incremental builds. This should be possible to handle (e.g. with approach similar to foundry-rs/compilers#140), but might become a blocker once we get to it |
This issue is resolved in #9366 along with enabling caching for coverage. |
Component
Forge
Describe the feature you would like
I'd like the build step in the coverage command to cache the contracts.
forge test
does, butforge coverage
does not. I understand there is a difference in how the contracts are built betweenforge test
&forge coverage
, so it's fine to have separate caches, but it'd be very helpful to have a cache here.Additional context
No response
The text was updated successfully, but these errors were encountered: