Skip to content

Support for code coverage through -Z instrument-coverage #8881

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

Open
ririsoft opened this issue May 19, 2021 · 4 comments
Open

Support for code coverage through -Z instrument-coverage #8881

ririsoft opened this issue May 19, 2021 · 4 comments
Labels
E-hard fun A technically challenging issue with high impact S-actionable Someone could pick this issue up and work on it right now

Comments

@ririsoft
Copy link

Hello,

Since source based code coverage is available in nightly , would that make sense to have support for dumping and showing coverage results at IDE level with rust-analyser ?

This is also mentioned in #8420 but the purpose of this feature request is to specifically focus on code coverage computation and rendering in the IDE with gutters and so independently from live/incremental testing.

For VSCode the MVP for me would be a Coverage lens that would run a given test and show related code coverage highlighting uncovered lines with a color (red by default).

Does that makes sens ?

@jonas-schievink jonas-schievink added E-hard fun A technically challenging issue with high impact S-actionable Someone could pick this issue up and work on it right now labels May 19, 2021
@eggyal
Copy link

eggyal commented Oct 21, 2021

Is it independent from live/incremental testing, though? Making use of -Z instrument-coverage would require re-running affected tests in order to obtain updated coverage output.

@appaquet
Copy link

For those looking for a good alternative in VSCode for now is to use cargo-llvm-cov with the coverage gutters extension.

It is as simple as running cargo llvm-cov --workspace --lcov --output-path lcov.info and then clicking on the Watch status bar button that the extension adds. This automatically loads the new coverage data when it gets run.

@HKalbasi
Copy link
Member

Blocked on microsoft/vscode#123713 ?

Is it independent from live/incremental testing, though? Making use of -Z instrument-coverage would require re-running affected tests in order to obtain updated coverage output.

Retesting can be invoked by a command.

@connor4312
Copy link

Blocked on microsoft/vscode#123713 ?

Test coverage has been finalized in the upcoming (1.88) release of VS Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-hard fun A technically challenging issue with high impact S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

No branches or pull requests

6 participants