Skip to content

Conversation

@jaisnan
Copy link
Contributor

@jaisnan jaisnan commented Nov 8, 2024

Description of changes:

Kani's source coverage changes the output parsing logic and the highlighting components. This PR fixes the broken integration.

Call-outs:

Some screenshots:
Screenshot 2024-11-08 at 4 07 52 PM

Screenshot 2024-11-08 at 4 07 22 PM

Testing:

  • How is this change tested?
    Tested manually

  • Is this a refactor change?
    No

Checklist

  • Each commit message has a non-empty body, explaining why the change was made
  • Methods or procedures are documented
  • Regression or unit tests are included, or existing tests cover the modified code
  • My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

return path.relative(workspaceFolder.uri.fsPath, fullPath);
}

// If not in a workspace, return the full path
Copy link
Contributor

Choose a reason for hiding this comment

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

will this be affected by model-checking/kani#2681?

const playbackCommand: string = `${kaniBinaryPath} --coverage -Z line-coverage --harness ${functionName}`;
// Run this command: cargo kani --coverage -Z source-coverage --harness verify_success
// to generate the source coverage output
const playbackCommand: string = `${kaniBinaryPath} --coverage -Z source-coverage --harness ${functionName}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

s/playbackCommand/coverageCommand

@celinval
Copy link
Contributor

Code coverage is currently broken, and this PR should fix it. We need to rebase this and test to see if it still works as expected. @jaisnan just checking if you are still planning to do this, or should we find a new owner? Thanks!

@carolynzech
Copy link

Closing in favor of #145.

@carolynzech carolynzech closed this Feb 6, 2025
tautschnig pushed a commit that referenced this pull request Mar 11, 2025
Updates the extension to use source-based coverage instead of line-based
coverage. See #139 for screenshots of how it looks.

1.
[a2e37a5](a2e37a5)
just applies the changes from #139 in a single commit, rebased on top of
main.
2.
[e2e3a40](e2e3a40)
changes the extension to show the "Get coverage info" button
automatically. Before, our documentation instructed a user to [go to
settings to enable the
button](https://github.com/carolynzech/kani-vscode-extension/blob/25489e8ad813f965428608870426f8e7b2ed35c8/docs/user-guide.md?plain=1#L82).
I couldn't find the setting to do that, and I figured if I couldn't find
it, our users wouldn't be able to either. I also don't think it makes
sense to hide it behind a setting. We can print the warning that it's
unstable, but the green/red coverage visual is one of the strongest
arguments for using the Kani extension instead of the command line, so
we should have this feature front and center.
3.
[69f376b](69f376b)
just removes comments and unused code.
4.
[8a99568](8a99568)
updates the documentation to reflect the shift from line-based to
source-based coverage, and the removal of the toggle option from
[e2e3a40](e2e3a40).
5.
[05d0246](05d0246)
introduces more custom types, so that we use those instead of any types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants