You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Checking for code coverage is done by running forge coverage which always compiles contracts and runs tests. This means that even if the contracts were already compiled and/or tested (for example as part of a previous step in a CI pipeline) they will be processed again. Enabling forge coverage to use existing build artifacts and to run duringforge test could prevent duplicate work from being carried out and make code coverage checks run faster.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Unfortunately forge coverage always must run with optimizations disabled whereas tests by default run with optimization enabled (related: #2486). We are looking at disabling optimizations by default which should make this possible but has other trade-offs (like stack to deep).
Going to mark this as a duplicate of #8889, feel free to participate in that conversation as it aims to resolve the same issue
Component
Forge
Describe the feature you would like
Checking for code coverage is done by running
forge coverage
which always compiles contracts and runs tests. This means that even if the contracts were already compiled and/or tested (for example as part of a previous step in a CI pipeline) they will be processed again. Enablingforge coverage
to use existing build artifacts and to run duringforge test
could prevent duplicate work from being carried out and make code coverage checks run faster.Additional context
No response
The text was updated successfully, but these errors were encountered: