From 88eec8db2f3aee3a1513a36a499a0642c1a6429e Mon Sep 17 00:00:00 2001 From: Siddhartha Srinivasa Date: Thu, 28 May 2026 10:35:53 -0700 Subject: [PATCH] setup.sh: wipe stale per-package .venv dirs before uv sync MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `uv run` inside a workspace member with its own .venv directory uses that local venv instead of the shared workspace one. Per-package venvs can be missing transitive deps that the workspace sync would install — silently producing ModuleNotFoundError. This was the root cause that masked the dep-declaration bugs fixed in mj_manipulator#163, ada_mj#38, and geodude#195. Idempotent: re-running setup.sh just deletes any per-package venvs that have re-appeared. Fixes #62 --- setup.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/setup.sh b/setup.sh index 6e6201f..1f25f79 100755 --- a/setup.sh +++ b/setup.sh @@ -41,6 +41,17 @@ else echo " mujoco_menagerie already present, skipping" fi +echo "" +echo "==> Removing stale per-package venvs (workspace uses shared root .venv)..." +# `uv run` inside a workspace member with its own .venv ignores the shared +# workspace venv, which is a common silent footgun. See robot-code#62. +shopt -s nullglob +for d in */.venv; do + echo " removing $d" + rm -rf "$d" +done +shopt -u nullglob + echo "" echo "==> Installing Python workspace (uv sync)..." uv sync