Skip to content

Commit

Permalink
Warn on coverage library not found for core add coverage operations
Browse files Browse the repository at this point in the history
  • Loading branch information
lynzrand committed Nov 6, 2024
1 parent de56085 commit 7f9466a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/moonbuild/src/gen/gen_runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ pub fn add_coverage_to_core_if_needed(
if mdb.name == MOONBITLANG_CORE {
info!("Automatically adding coverage library to other packages in the core module");

// Check if the coverage library is available
if !mdb.contains_package(MOONBITLANG_COVERAGE) {
log::warn!("Coverage library is not available in core module. Skipping relevant operations.");
return Ok(());
}

// Add coverage library reference to each package
for (pkg_name, pkg) in mdb.get_all_packages_mut() {
if is_self_coverage_lib(pkg_name) || is_skip_coverage_lib(pkg_name) {
Expand Down

0 comments on commit 7f9466a

Please sign in to comment.