Skip to content

Commit 6a9d36d

Browse files
nbafrankclaude
andcommitted
#30: only emit "sysreqs check skipped" warn when packages declare SystemRequirements
pat-s reported that a binaries-only Alpine install (cli/glue/rlang — none with `SystemRequirements`) still triggered the loud "System dependency check skipped on alpine-3.23.2" warning, which reads as a real problem when in fact nothing needed checking. Gate the unsupported-distro warning on the presence of at least one package with a non-empty `SystemRequirements` field. When no package declares any sysreqs there's nothing we could have checked, so the warning is pure noise. The `else if !check.missing.is_empty()` branch (real missing deps detected) is unchanged — that warning still fires when applicable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0ee2945 commit 6a9d36d

1 file changed

Lines changed: 19 additions & 3 deletions

File tree

crates/uvr/src/commands/sync.rs

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,26 @@ pub async fn install_from_lockfile(
249249
if !queries.is_empty() {
250250
let check = sysreqs::check_system_deps(&client, &queries, &distro).await;
251251

252-
if check.unsupported_distro && check.missing.is_empty() {
252+
// #30 follow-up: only fire the unsupported-distro warning
253+
// when at least one package actually declares
254+
// `SystemRequirements`. pat-s reported that on Alpine 3.23.x
255+
// a binaries-only install of `cli/glue/rlang` (no sysreqs
256+
// at all) still triggered the loud "System dependency check
257+
// skipped" warning, which reads as a real problem when in
258+
// fact nothing needed checking. Gate on the presence of
259+
// sysreqs so the warning fires only when there's actually
260+
// a check we couldn't perform.
261+
let any_has_sysreqs = queries.iter().any(|q| {
262+
q.system_requirements
263+
.as_deref()
264+
.is_some_and(|s| !s.trim().is_empty())
265+
});
266+
267+
if check.unsupported_distro && check.missing.is_empty() && any_has_sysreqs {
253268
// PPM doesn't cover this distro AND the local fallback
254-
// found nothing (either no SystemRequirements present or
255-
// no rule matched). Tell the user we skipped the check
269+
// found nothing (either no rule matched any of the
270+
// declared SystemRequirements, or the local rules are
271+
// out of date). Tell the user we skipped the check
256272
// rather than silently claiming everything is fine.
257273
eprintln!();
258274
ui::warn_block(

0 commit comments

Comments
 (0)