From d9158ac7e28c8b7a50cd030f5d80c6c492ac768c Mon Sep 17 00:00:00 2001 From: jdx <216188+jdx@users.noreply.github.com> Date: Wed, 4 Dec 2024 17:05:09 -0600 Subject: [PATCH] fix: show warning if no precompiled pythons found (#3359) --- src/plugins/core/python.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/plugins/core/python.rs b/src/plugins/core/python.rs index 3c6ca1396..52b98c056 100644 --- a/src/plugins/core/python.rs +++ b/src/plugins/core/python.rs @@ -156,9 +156,16 @@ impl PythonPlugin { tv.version ); } - debug!("no precompiled python found for {}", tv.version); - let mut available = precompiled_versions.iter().map(|(v, _, _)| v); - trace!("available precompiled versions: {}", available.join(", ")); + let available = precompiled_versions.iter().map(|(v, _, _)| v).collect_vec(); + if available.is_empty() { + debug!("no precompiled python found for {}", tv.version); + } else { + warn!("no precompiled python found for {}, force mise to use a precompiled version with `mise settings set python.compile=false`", tv.version); + } + trace!( + "available precompiled versions: {}", + available.into_iter().join(", ") + ); return self.install_compiled(ctx, tv); } };