From 069fd2e20e3fc3ba7d378538c83f26ef06b0c818 Mon Sep 17 00:00:00 2001 From: Anthony Cruz Date: Wed, 14 Jan 2026 16:00:01 -0800 Subject: [PATCH] fix(env): avoid venv/go backend deadlock during env resolution Ensure Python venv creation does not resolve all tools (including go:*), which could trigger dependency_toolset() and re-enter config.env(), causing a circular dependency and timeouts when resolving backends. Limit the toolset used for venv creation to python and uv, resolve those tools only, and warn once when required Python versions are missing. Add an e2e test covering initial installs with a Python venv and a go backend tool to prevent regressions. Fixes: https://github.com/jdx/mise/discussions/7059 --- ..._python_venv_with_go_backend_deadlock_slow | 31 +++++++++++++++++++ src/config/env_directive/venv.rs | 25 ++++++++++++--- 2 files changed, 52 insertions(+), 4 deletions(-) create mode 100755 e2e/core/test_python_venv_with_go_backend_deadlock_slow diff --git a/e2e/core/test_python_venv_with_go_backend_deadlock_slow b/e2e/core/test_python_venv_with_go_backend_deadlock_slow new file mode 100755 index 0000000000..6c6ff452cd --- /dev/null +++ b/e2e/core/test_python_venv_with_go_backend_deadlock_slow @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +# Test for deadlock issue between Python venv creation and Go backend tools +# This reproduces the scenario where go:* tools with dependencies would cause +# a circular dependency during environment resolution while creating Python venv. +# fixes https://github.com/jdx/mise/discussions/7059 +set -euo pipefail + +cat >.mise.toml <