Setup
Setup for the Lean runtime used by wonton-soup.
Contract
- Lean is pinned by
lean-toolchain(4.25.0). leantreeis pinned bypyproject.tomlanduv.lock.LEAN_PROJECT_PATHpoints to the warmed Lean project. If unset,setup_lean.pycreateslean_project/.LEAN_REPL_EXEmay point to a prebuilt REPL binary.
Requirements
- Python 3.12+
uvelan
Install the pinned Lean toolchain if needed:
elan install leanprover/lean4:v4.25.0
elan default leanprover/lean4:v4.25.0
lean --versionFrom dossiers/wonton-soup/:
uv sync
uv run python setup_lean.pyShared runtime roots are explicit:
export WONTON_SOUP_RUNTIME_ROOT="${WONTON_SOUP_RUNTIME_ROOT:-$HOME/.local/state/wonton-soup}"
export LEAN_PROJECT_PATH="${LEAN_PROJECT_PATH:-$WONTON_SOUP_RUNTIME_ROOT/lean_project}"
export LEAN_REPL_EXE="${LEAN_REPL_EXE:-$WONTON_SOUP_RUNTIME_ROOT/bin/repl}"
uv run python setup_lean.pySmoke Test
uv run python wonton.py lean run -m dev --sample 3 --seed 123 --plainExpected output:
logs/corpus-YYYY-MM-DD-HHMMSS/run_status.jsonwithstatus: completedsummary.json.gz
Failure Checks
lake not found: prepend$HOME/.elan/bintoPATH.- Lean mismatch: run
elan override set leanprover/lean4:v4.25.0. - Wrong Python: run
uv sync --python "$(which python)". - REPL build failure: run
lake exe cache get && lake buildinsidelean_project/. - Wrong Lean project: print
LEAN_PROJECT_PATHand confirm it resolves to this dossier’s project.