Skip to content
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: allow forge coverage to reuse build/test artifacts #8904

Closed
vbidin opened this issue Sep 19, 2024 · 1 comment
Closed

feat: allow forge coverage to reuse build/test artifacts #8904

vbidin opened this issue Sep 19, 2024 · 1 comment
Labels
T-feature Type: feature T-needs-triage Type: this issue needs to be labelled

Comments

@vbidin
Copy link

vbidin commented Sep 19, 2024

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. Enabling forge coverage to use existing build artifacts and to run during forge test could prevent duplicate work from being carried out and make code coverage checks run faster.

Additional context

No response

@vbidin vbidin added T-feature Type: feature T-needs-triage Type: this issue needs to be labelled labels Sep 19, 2024
@zerosnacks
Copy link
Member

Hi @vbidin thanks for your suggestion

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

@zerosnacks zerosnacks closed this as not planned Won't fix, can't repro, duplicate, stale Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-feature Type: feature T-needs-triage Type: this issue needs to be labelled
Projects
None yet
Development

No branches or pull requests

2 participants