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

run coverage before doc-build so it doesn't delete the docs that were just built #1392

Merged
merged 2 commits into from
May 2, 2021

Conversation

syphar
Copy link
Member

@syphar syphar commented May 2, 2021

related issue: rust-lang/cargo#9447

@syphar syphar self-assigned this May 2, 2021
@syphar syphar added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label May 2, 2021
Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

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

This seems like a good approach until the upstream bug is fixed. Thanks!

// we have to run coverage before the doc-build because currently it
// deletes the doc-target folder.
// https://github.com/rust-lang/cargo/issues/9447
let doc_coverage = match self.get_coverage(target, build, metadata, limits) {
Copy link
Member

Choose a reason for hiding this comment

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

Do you mind adding a build test that coverage is generated? Maybe it could look at the /crate page and see if there's a % sign somewhere (see https://docs.rs/crate/tokio/1.5.0 for an example of what that looks like).

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll add a test.
Instead of checking the HTML output I would propose we just check if the coverage is in the database, which is good enough to know if the build with coverage worked, right?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, that's a better test :)

Copy link
Member Author

Choose a reason for hiding this comment

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

@jyn514 I added the assertion to the build-test

@syphar syphar added S-waiting-on-author Status: This PR is incomplete or needs to address review comments and removed S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels May 2, 2021
@syphar syphar force-pushed the reorder-coverage branch 2 times, most recently from 387234a to 0cde41c Compare May 2, 2021 17:44
@syphar syphar requested a review from jyn514 May 2, 2021 18:07
@syphar syphar added S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed and removed S-waiting-on-author Status: This PR is incomplete or needs to address review comments labels May 2, 2021
@jyn514 jyn514 merged commit 569d6d3 into rust-lang:master May 2, 2021
@syphar syphar deleted the reorder-coverage branch May 2, 2021 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants