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

Inject metadata into the llvm-cov JSON output #289

Merged
merged 2 commits into from
Jul 7, 2023

Conversation

dnaka91
Copy link
Contributor

@dnaka91 dnaka91 commented Jun 30, 2023

As discussed in #285, this injects some metadata into the JSON output of llvm-cov. This can be helpful for tools that rely on the output of it and cargo-llvm-cov as well.

It adds in the following fields under a new cargo_llvm_cov field in the root JSON structure:

  • version is the cargo-llvm-cov version that was invoked. Helpful for tools to verify that cargo-llvm-cov is of a certain version and has some expected behavior.
  • manifest_path is the location of the Cargo.toml as resolved by cargo-llvm-cov. This is two-fold:
    • It can reduce repetition, as otherwise a custom manifest path would need to specified for both cargo-llvm-cov and the other tool.
    • There might be minor differences in how the mainfest path was resolved, so this ensures the other tool gets exactly the same manifest path as cargo-llvm-cov.

Fixes #285

@taiki-e
Copy link
Owner

taiki-e commented Jul 3, 2023

LGTM. Could you resolve the merge conflict?

@dnaka91
Copy link
Contributor Author

dnaka91 commented Jul 5, 2023

Done. Just ping me in case any conflict comes up again 🙇‍♂️

@taiki-e taiki-e merged commit 1ea8be4 into taiki-e:main Jul 7, 2023
@taiki-e
Copy link
Owner

taiki-e commented Jul 7, 2023

Thanks! Published in 0.5.23.

@dnaka91 dnaka91 deleted the json-metadata branch July 7, 2023 15:13
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.

Include cargo-llvm-cov version in the JSON output
2 participants