From a275df2a70261157de06536dc9f0c8a1850bea2e Mon Sep 17 00:00:00 2001 From: jdx <216188+jdx@users.noreply.github.com> Date: Wed, 4 Dec 2024 16:57:07 -0600 Subject: [PATCH] fix: show warning if no precompiled pythons found --- 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); } };