All notable changes to this project will be documented in this file.
This project adheres to Semantic Versioning.
Releases may yanked if there is a security bug, a soundness bug, or a regression.
0.6.14 - 2024-10-12
- Add unstable
--mcdc
flag to enable mcdc coverage. (#383, thanks @Swatinem)
0.6.13 - 2024-09-14
- Distribute prebuilt binary for x86_64 FreeBSD.
0.6.12 - 2024-09-03
-
Add
--profraw-only
option tocargo llvm-cov clean
subcommand. (#385, thanks @smoelius) -
Respect
target.<triple>.rustdocflags
that added in Cargo 1.78. -
Disable quick-install fallback of cargo-binstall.
0.6.11 - 2024-07-18
-
Add support for MC/DC coverage. (#363, thanks @aytey)
-
Documentation improvements.
0.6.10 - 2024-06-01
-
Update
ruzstd
to 0.7.This increases the rustc version required to build cargo-llvm-cov. (rustc 1.70+ -> 1.73+) The cargo/rustc version required to run cargo-llvm-cov remains unchanged.
0.6.9 - 2024-04-05
-
Skip merging profraw data if profraw files don't exist and a profdata file already exists. (#360, thanks @weiznich)
-
Update
opener
to 0.7.
0.6.8 - 2024-03-16
- Add unstable
--branch
flag to enable branch coverage. (#356)
0.6.7 - 2024-03-10
-
Add
--nextest-archive-file
option tocargo llvm-cov report
to support calling it for the result ofcargo llvm-cov nextest --archive-file
. (#355) -
Add unstable
--dep-coverage
option to show coverage of th specified dependency instead of the crates in the current workspace. (#353) -
Fix issues in report when merging coverage. (#354)
0.6.6 - 2024-02-22
-
It is no longer needed to pass
--target
/--release
/--cargo-profile
tocargo llvm-cov nextest --archive-file
in most cases. Options passed tocargo llvm-cov nextest-archive
are now respected. (#349) -
Support
--release
and--cargo-profile
options forcargo llvm-cov nextest-archive
. (#348)
0.6.5 - 2024-02-07
- Add
--skip-functions
flag to coverage generation. (#346, thanks @mlveggo)
0.6.4 - 2024-01-25
- Make
home
dependency Windows-only dependency.
0.6.3 - 2024-01-24
- Fix "The file was not recognized as a valid object file" error with
--doc
/--doctests
flag on WSL. (#343)
0.6.2 - 2024-01-18
- Support setting file name of
LLVM_PROFILE_FILE
. (#340)
0.6.1 - 2024-01-13
-
Support
--target
option forcargo llvm-cov nextest-archive
. (#334) -
Support
--no-cfg-coverage
and--no-cfg-coverage-nightly
flags incargo llvm-cov show-env
. (#333)
0.6.0 - 2023-12-28
-
Make
--hide-instantiations
flag default, and add--show-instantiations
flag to allow opt-in of the previous behavior. (#330) -
Support
cargo llvm-cov nextest --archive-file
. (#266, thanks @magnusja) -
Add hint about cfgs. (#330)
0.5.39 - 2023-12-16
- Remove dependency on
is-terminal
.
0.5.38 - 2023-12-13
- Fix panic when running tests at
/
such as in docker. (#326, thanks @MikeDevresse)
0.5.37 - 2023-11-17
- Add
--fail-under-{functions,regions}
options. (#323, thanks @CobaltCause)
0.5.36 - 2023-10-30
- Support
--doctests
flag incargo llvm-cov report
andcargo llvm-cov show-env
.
0.5.35 - 2023-10-18
- Improve compile time.
0.5.34 - 2023-10-17
- Improve performance and reduce disc usage by passing
--no-deps
tocargo metadata
.
0.5.33 - 2023-09-26
- Fix "The file was not recognized as a valid object file" error on WSL. (#317)
0.5.32 - 2023-09-23
-
Fix an issue where codes in the standard library are not being properly excluded from reports when using a custom toolchain. (#311)
-
Document a way to display coverage in VS Code.
0.5.31 - 2023-08-24
-
Fix empty source path generated in cobertura.xml. (#309, thanks @mstyura)
-
Prepare for future branch coverage support. (#308, thanks @Swatinem)
0.5.30 - 2023-08-23
-
Fix an issue where coverage is not collected or fails to generate coverage on
cdylib
or proc-macro crate on Windows. (#307) -
Escape values that are shown by
show-env
subcommand. (#307)
0.5.29 - 2023-08-23
- Diagnostics improvements. (#302)
0.5.28 - 2023-08-22
0.5.27 - 2023-08-14
- Allow nightly to be specified by setting
RUSTC_BOOTSTRAP=1
, the same as for rustc and cargo. (#298, thanks @RocketJas)
0.5.26 - 2023-08-12
- Fix support for
trybuild
1.0.76+. (#301)
0.5.25 - 2023-08-06
-
Use
--show-missing-lines
logic in--fail-uncovered-lines
. (#277, thanks @michaelvlach) -
cargo-llvm-cov no longer sets the
CARGO_INCREMENTAL=0
environment variable. (#297)
0.5.24 - 2023-07-28
- Update
cargo_metadata
to 0.17.
0.5.23 - 2023-07-07
-
Inject additional contextual information about cargo-llvm-cov into the JSON output of llvm-cov. (#289, thanks @dnaka91)
It allows other programs, that rely on this output, to make certain assertions about the behavior of cargo-llvm-cov and can help to share common information.
0.5.22 - 2023-06-29
- Fix regression introduced in 0.5.21.
0.5.21 - 2023-06-29
Note: This release has been yanked due to regression fixed in 0.5.22.
- Fix "
-Z doctest-in-workspace
has been stabilized in the 1.72 release" warning on the latest nightly.
0.5.20 - 2023-06-02
-
cargo-llvm-cov no longer sets the
RUST_TEST_THREADS
andNEXTEST_TEST_THREADS
environment variables. cargo-llvm-cov now adopts another efficient way to workaround rust-lang/rust#91092. (#279)This may greatly improve performance, especially when using
cargo llvm-cov nextest
.
0.5.19 - 2023-04-28
- Fix handling of
--cargo-profile
option forcargo llvm-cov nextest
. (#269)
0.5.18 - 2023-04-25
- Support
--ignore-run-fail
forcargo llvm-cov nextest
. (#263)
0.5.17 - 2023-04-21
- Set
CARGO_LLVM_COV
environment variable. (#259, thanks @def-)
0.5.16 - 2023-04-18
- Improve the
--codecov
flag to match how region coverage is calculated to the HTML report. (#255, thanks @andrewgazelka)
0.5.15 - 2023-04-15
- Fix version detection with dev build. (#257, thanks @tofay)
0.5.14 - 2023-04-05
- Fix an issue where
--codecov
flag reports a fully covered line as only partially covered or not covered. (#253, thanks @andrewgazelka)
0.5.13 - 2023-04-03
- Fix an issue where
--codecov
flag doesn't exclude files that should be excluded from the report. (#251)
0.5.12 - 2023-04-02
- Add
--codecov
flag to support "Codecov Custom Coverage" format. This allows using region coverage on Codecov. (#249, thanks @andrewgazelka)
0.5.11 - 2023-02-28
- Remove dependency on
tempfile
.
0.5.10 - 2023-02-23
-
Update
lexopt
to 0.3. -
Update
cargo-config2
to 0.1.5.
0.5.9 - 2023-01-15
- Support
trybuild
1.0.76+. (#238)
0.5.8 - 2023-01-15
- Fix handling of cases where the target directory contains glob characters.
0.5.7 - 2023-01-11
- Fix "cannot satisfy dependencies so
std
only shows up once" error oncargo llvm-cov nextest
introduced in 0.5.4.
0.5.6 - 2023-01-11
- Distribute prebuilt macOS universal binary.
0.5.5 - 2023-01-10
- Fix regression on doctests introduced in 0.5.4.
0.5.4 - 2023-01-09
-
Use
cargo-config2
to load Cargo configuration. (#237)This brings the following improvements:
- More accurate cargo configuration loading and resolution.
- Fix installation failure on Rust 1.60 and 1.61 by removing dependency on
target-spec
. - Remove run-time dependency on unstable
cargo config get
. (Previously, this command was used in a form allowing failure, likerust-analyzer
does.)
0.5.3 - 2022-12-15
-
Fix an issue where coverage of binary targets containing hyphens was not collected correctly. (#232)
-
Fix help messages for
cargo llvm-cov report
subcommand.
0.5.2 - 2022-11-27
- Fix an issue where if
--cobertura
and--output-path
are used simultaneously, then the saved file doesn't contain the cobertura-style output. (#228, thanks @yuval-nextsilicon)
0.5.1 - 2022-11-27
-
Add
--cobertura
flag to support Cobertura's XML report format. (#224, thanks @mike-kfed) -
Limit the number of test threads for
nextest
to work around rust-lang/rust#91092. (#223)For subcommands other than
cargo llvm-cov nextest
, the same workaround has already been applied since 0.4.6. -
Replace
atty
withis-terminal
. (#226)
0.5.0 - 2022-09-10
-
Improve handling of cases where
llvm-tools-preview
component is not installed. (#219)TL;DR: You no longer need to install
llvm-tools-preview
before running cargo-llvm-cov in most cases.The new logic is based on the logic used by Miri when
rust-src
component orxargo
is not installed.See #219 for more.
-
Fix various CLI-related bugs. (#197, #217)
This fixes various bugs related to subcommands (especially
nextest
). The following is a partial list: -
Add
cargo llvm-cov report
subcommand. (#217) This is equivalent tocargo llvm-cov --no-run
, but it has a more obvious name and better diagnostics. -
Add
cargo llvm-cov test
subcommand. (#217) This is equivalent tocargo llvm-cov
without subcommand, except that test name filtering is supported. -
Deprecate
--no-run
in favor ofcargo llvm-cov report
subcommand. (#217) -
Add
--no-clean
flag to build without cleaning any old build artifacts. See #214 for more. -
cargo-llvm-cov no longer redirects output from stdout to stderr if unnecessary. (#206)
-
Support shared
target
directory. (#215) -
Support
--keep-going
(unstable),--ignore-rust-version
. (#217) -
Support
--exclude-from-report
and--ignore-run-fail
forcargo llvm-cov run
. (#217) -
Support relative path in
CARGO_LLVM_COV_TARGET_DIR
. (#220) -
Add
LLVM_COV_FLAGS
/LLVM_PROFDATA_FLAGS
environment variables to pass additional flags to llvm-cov/llvm-profdata in a space-separated list. (#220) -
Deprecate
CARGO_LLVM_COV_FLAGS
/CARGO_LLVM_PROFDATA_FLAGS
environment variables instead ofLLVM_COV_FLAGS
/LLVM_PROFDATA_FLAGS
environment variables. (#220) -
Document environment variables that cargo-llvm-cov reads. (#220)
-
Remove
cargo llvm-cov help
subcommand that was added automatically by clap. (#197) -
cargo-llvm-cov no longer maps the
--jobs
(-j
) option to llvm-cov/llvm-profdata's-num-threads
option.This is to avoid confusion when using the
-j
option withnextest
, which uses the-j
option in a different sense than cargo. -
Improve compile time. (#197)
-
Diagnostics improvements.
0.4.14 - 2022-08-06
- Fix an issue where "File name or extension is too long" error occurs in Windows. (#203, thanks @messense)
0.4.13 - 2022-08-01
- Fix an issue where merging of multiple
cargo llvm-cov run
coverage did not work.
0.4.12 - 2022-07-30
-
Support
target.<cfg>.rustflags
. (#200) -
Remove workaround for an old rustc bug on Windows if unnecessary. (#199, thanks @ldm0)
0.4.11 - 2022-07-20
- Fix handling of existing CFLAGS/CXXFLAGS when
--include-ffi
flag is passed. (#196)
0.4.10 - 2022-07-18
- Support coverage of C/C++ code linked to Rust library/binary. (#194)
0.4.9 - 2022-07-07
- Fix an issue where some files were incorrectly ignored in reports. (#191)
0.4.8 - 2022-06-16
- Correctly escape regular expressions passed to
-ignore-filename-regex
. (#188, thanks @rhysd)
0.4.7 - 2022-06-13
- Pin clap to 3.1. (#185)
0.4.6 - 2022-06-13
-
Improve
--show-missing-lines
for multiple functions in a single line. (#183, thanks @vmiklos) -
Limit the number of test threads to work around rust-lang/rust#91092. (#184)
0.4.5 - 2022-06-02
-
Fix handling of
RUSTC_WRAPPER
,RUSTC
, and similar environment variables and configs. (#180) -
Distribute prebuilt binaries for AArch64 macOS. (#179)
0.4.4 - 2022-05-30
-
Add
--fail-uncovered-{lines,regions,functions}
options to set the exit code based on uncovered {lines,regions,functions}. (#173) -
Add
--ignore-run-fail
option to generate coverage even if tests fail. (#174)
0.4.3 - 2022-05-29
- Fix metadata for cargo binstall. (#176)
0.4.2 - 2022-05-29
- Add metadata for cargo binstall. (#175, thanks @vmiklos)
0.4.1 - 2022-05-24
- Add
--coverage-target-only
flag to use rustflags only for target. (#167, thanks @haraldh)
0.4.0 - 2022-05-12
-
cargo-llvm-cov no longer changes the current directory when running cargo. (#161)
-
Exclude build script from report by default. (#163) You can use
--include-build-script
flag to include build script in report. -
Set
cfg(coverage_nightly)
when nightly compiler is used. (#164) -
Support short flags of
--release
(-r
) and--features
(-F
). (#165) -
Support custom profiles. (#166)
0.3.3 - 2022-05-06
- Fix an issue where codes in the target directory are not being properly excluded from reports when using
show-env
subcommand. (#156)
0.3.2 - 2022-05-05
- Alleviate an issue where "File name or extension is too long" error occurs in Windows. (#155)
0.3.1 - 2022-05-01
- Calculate
--show-missing-lines
based on function regions. (#150, thanks @vmiklos)
0.3.0 - 2022-04-08
-
cargo-llvm-cov now always select the current toolchain. (#148)
Previously, if
-C instrument-coverage
is not available in the current toolchain, the nightly toolchain was used. (See release note of 0.2.0 for more information on the previous behavior.) -
Make
--remap-path-prefix
optional. (#141)Previously this flag was always used, but due to some bugs discovered we decided to disable it by default. If you were dependent on the behavior provided by this flag, you can use the same behavior by passing the
--remap-path-prefix
flag to cargo-llvm-cov. -
Stabilize a few unstable options.
0.2.4 - 2022-03-18
- Add support for
nextest
. (#144, thanks @skyzh)
0.2.3 - 2022-03-05
- Add
--show-missing-lines
option to show uncovered lines in the command-line output. (#143, thanks @vmiklos)
0.2.2 - 2022-03-01
- Add
--fail-under-lines
option to set the exit code based on coverage percentage. (#139, thanks @vmiklos)
0.2.1 - 2022-02-18
- Update clap to 3.1. (#136)
0.2.0 - 2022-02-06
-
Update to stabilized
-C instrument-coverage
. (#130)Support for
-Z instrument-coverage
in the old nightly will also be kept for compatibility.Compatibility Note: In 0.2, if
-C instrument-coverage
or-Z instrument-coverage
is not available in the default toolchain, runningcargo llvm-cov
will find and use nightly (this is almost the same behavior as 0.1). This behavior is necessary because only the recent nightly currently supports-C instrument-coverage
(and also for compatibility with 0.1). This behavior will be changed in 0.3 to always select the default toolchain. If you are likely to be affected by the change in 0.3, cargo-llvm-cov will emit a warning. 0.3 is planned to be released after-C instrument-coverage
is available in the stable toolchain. -
Remove support of multiple values in
--package
and--exclude
. (#133) -
Add
--exclude-from-test
option to exclude specific packages from the test but not from the report. (#131) -
Add
--exclude-from-report
option to exclude specific packages from the report but not from the test. (#131) -
Workspace members are now always included in the report unless specified by
--exclude
or--exclude-from-report
. (#131)
0.1.16 - 2022-01-21
-
Alleviate an issue where "File name or extension is too long" error occurs in Windows. (#126, thanks @aganders3)
-
Re-enable multiple values for
--package
and--exclude
. (#127, thanks @aganders3)This behavior was unintentionally enabled in older versions and disabled in recent versions.
We will support this again in 0.1.x for compatibility, but will remove it in 0.2.x.
-
Distribute prebuilt binaries for AArch64 Linux (gnu and musl).
0.1.15 - 2022-01-06
- Fix bug in
show-env
subcommand. (#121)
0.1.14 - 2022-01-06
-
Add
show-env
subcommand. (#115, thanks @davidhewitt) -
cargo-llvm-cov no longer sets
CARGO_TARGET_DIR
. (#112, thanks @smoelius) -
cargo-llvm-cov can now properly exclude arbitrary
CARGO_HOME
andRUSTUP_HOME
from reports.
0.1.13 - 2021-12-14
- Support custom-built rust toolchain. (#111, thanks @tofay)
0.1.12 - 2021-11-15
- Exclude
CARGO_HOME
andRUSTUP_HOME
used in the official rust docker image from reports. (#105)
0.1.11 - 2021-11-13
- Fix "conflicting weak extern definition" error on windows. (#101)
0.1.10 - 2021-10-24
- Fix a compatibility issue with
cc
. (#98)
0.1.9 - 2021-10-13
- Distribute statically linked binary on Windows MSVC. (#95)
0.1.8 - 2021-10-04
- Fix an issue where some files were incorrectly ignored in reports. (#94, thanks @larsluthman)
0.1.7 - 2021-09-19
- Add
--failure-mode
option. (#91, thanks @smoelius)
0.1.6 - 2021-09-03
- Add
cargo llvm-cov run
subcommand to get coverage ofcargo run
. (#89)
0.1.5 - 2021-09-01
-
Add
--workspace
flag tocargo llvm-cov clean
subcommand. (#85) -
Fix bug around artifact cleanup. (#85)
0.1.4 - 2021-08-29
-
Improve heuristics around artifact cleanup. (#79) This removes the need to recompile dependencies in most cases.
-
Fix an issue where
--package
option could not handle package specifications containing the version such asfutures:0.3.16
. (#80)
0.1.3 - 2021-08-26
-
Add
--verbose
option tocargo llvm-cov clean
subcommand. (#75)
0.1.2 - 2021-08-26
Note: This release has been yanked due to regressions fixed in 0.1.3.
-
Set
cfg(coverage)
to easily use#[no_coverage]
. (#72) -
Add
--quiet
,--doc
, and--jobs
options. (#70) -
Add
cargo llvm-cov clean
subcommand. (#73)
0.1.1 - 2021-08-25
-
Add
--lib
,--bin
,--bins
,--example
,--examples
,--test
,--tests
,--bench
,--benches
,--all-targets
,--profile
, and--offline
options. (#67) -
Respect
BROWSER
environment variable anddoc.browser
cargo config. (#66)
0.1.0 - 2021-08-15
-
Update clap to fix build error. (#59)
-
Support latest version of trybuild. (#54)
-
Change output directory of
--html
and--open
options fromtarget/llvm-cov
totarget/llvm-cov/html
. (#62) -
You can now merge the coverages generated under different test conditions by using
--no-report
and--no-run
. (#55)cargo clean cargo llvm-cov --no-report --features a cargo llvm-cov --no-report --features b cargo llvm-cov --no-run --lcov
-
Add environment variables to pass additional flags to llvm-cov/llvm-profdata. (#58)
CARGO_LLVM_COV_FLAGS
to pass additional flags to llvm-cov. (value: space-separated list)CARGO_LLVM_PROFDATA_FLAGS
to pass additional flags to llvm-profdata. (value: space-separated list)
-
Fix "Failed to load coverage" error when together used with trybuild. (#49)
-
Fix bug in
--exclude
and--package
options. (#56) -
Fix bug in color-detection when both
--text
and--output-dir
used. (#62) -
--html
and--open
options no longer outputs a summary at the same time. (#61) -
Respect rustflags and rustdocflags set by cargo config file. (#52)
-
Diagnostic improvements.
0.1.0-alpha.5 - 2021-08-07
-
Support Windows. (#41)
-
Support trybuild. (#44)
-
Fix mapping error in
--doctests
option. (#40) -
Fix bug in
--target
option. (#46) -
Add
--package
option. (#42)
0.1.0-alpha.4 - 2021-06-13
-
cargo-llvm-cov no longer requires rustfilt. (#29)
-
Acknowledge that procedural macros are supported. (#27)
-
Fix support of testing binary crate. (#23)
-
Fix an issue where git dependencies were displayed in the coverage report. (#19)
-
Fix an issue where path dependencies that not included in the workspace were displayed in coverage report. (#25)
-
Fix bug in
--exclude
option. (#30) -
Fix several bugs.
-
Add
--output-path
option to specify a file to write coverage data into. (#18) -
Add
--ignore-filename-regex
option to skip specified source code files from coverage report. (#19) -
Add
--color
option. (#15) -
Add
--no-fail-fast
,--frozen
, and--locked
option. (#16) -
Add
--verbose
flag. (#19) -
Improve diagnostics when the required tools are not installed. (#17)
0.1.0-alpha.3 - 2021-06-04
-
cargo-llvm-cov no longer requires cargo-binutils. (#11)
-
--json
flag now exports all coverage data by default. (#9) If you want to get only summary information, use--summary-only
flag together. -
Enable
--html
flag automatically when--open
flag is passed. (#5) -
Add
--lcov
flag for exporting coverage data in "lcov" format. (#9) -
Add
--output-dir
flag for specifying a directory to write coverage reports generated by--html
or--text
flag. (#9) -
Fix a bug in cargo version detection. (#7)
-
Fix an issue where llvm-cov's auto-detection of color output doesn't work. (#11)
-
Fix several bugs.
-
Documentation improvements.
0.1.0-alpha.2 - 2021-02-12
- Add
--text
option to output full report in plain text. (#3, thanks @romac)
0.1.0-alpha.1 - 2021-01-23
Initial release