From 9ce5f9be65d30bf9c4522ae1fd6f4490f696e30b Mon Sep 17 00:00:00 2001 From: Leynos Date: Wed, 13 Aug 2025 21:00:35 +0100 Subject: [PATCH 1/2] Check llvm-tools-preview component for coverage --- Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 917a113..1ab625d 100644 --- a/Makefile +++ b/Makefile @@ -9,10 +9,14 @@ NIXIE ?= nixie COV_MIN ?= 0 # Minimum line coverage percentage for coverage targets define CHECK_CARGO_LLVM_COV - @command -v cargo-llvm-cov >/dev/null || { \ - echo "error: cargo-llvm-cov not found. Install with: cargo install cargo-llvm-cov"; \ - exit 127; \ - } + @command -v cargo-llvm-cov >/dev/null || { \ + echo "error: cargo-llvm-cov not found. Install with: cargo install cargo-llvm-cov"; \ + exit 127; \ + } + @rustup component list --installed | grep -q '^llvm-tools-preview' >/dev/null || { \ + echo "error: rustup component llvm-tools-preview not found. Install with: rustup component add llvm-tools-preview"; \ + exit 127; \ + } endef build: target/debug/$(APP) ## Build debug binary From 847a986dc808e940d5c91af90d03fdeab7d833d2 Mon Sep 17 00:00:00 2001 From: Leynos Date: Thu, 14 Aug 2025 01:51:22 +0100 Subject: [PATCH 2/2] Add a rustup presence check and send errors to stderr; drop redundant redirection. Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 1ab625d..268b66f 100644 --- a/Makefile +++ b/Makefile @@ -10,11 +10,15 @@ COV_MIN ?= 0 # Minimum line coverage percentage for coverage targets define CHECK_CARGO_LLVM_COV @command -v cargo-llvm-cov >/dev/null || { \ - echo "error: cargo-llvm-cov not found. Install with: cargo install cargo-llvm-cov"; \ + echo "error: cargo-llvm-cov not found. Install with: cargo install cargo-llvm-cov" >&2; \ exit 127; \ } - @rustup component list --installed | grep -q '^llvm-tools-preview' >/dev/null || { \ - echo "error: rustup component llvm-tools-preview not found. Install with: rustup component add llvm-tools-preview"; \ + @command -v rustup >/dev/null || { \ + echo "error: rustup not found. Install from: https://rustup.rs" >&2; \ + exit 127; \ + } + @rustup component list --installed | grep -q '^llvm-tools-preview' || { \ + echo "error: rustup component llvm-tools-preview not found. Install with: rustup component add llvm-tools-preview" >&2; \ exit 127; \ } endef