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

fix(coverage): write coverage artifacts to separate dir #9366

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

yash-atreya
Copy link
Member

Motivation

Closes #8840.
Addresses #8840 (comment).

Solution

  • Write coverage and build-info artifacts to out/coverage and out/coverage/build-info.
  • Add a warning that optimizer settings have been disabled.

// coverage builds.
let coverage_artifacts_path = project.artifacts_path().join("coverage");
project.paths.artifacts = coverage_artifacts_path.clone();
project.paths.build_infos = coverage_artifacts_path.join("build-info");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cache path also needs to be updated. could we add a test that runs forge build -> forge coverage -> forge build -> forge coverage and asserts that 2 latest commands do not compile anything?

@yash-atreya yash-atreya marked this pull request as draft November 21, 2024 09:16
@yash-atreya
Copy link
Member Author

yash-atreya commented Nov 21, 2024

Ref: #8904 + #8889

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

chore: warn optimization is disabled when forge coverage is called
2 participants