Skip to content

fix(ant-dev): tooling cluster — flag alias, sys.executable, anvil preflight, README#83

Open
Nic-dorman wants to merge 1 commit into
mainfrom
fix/ant-dev-tooling-cluster
Open

fix(ant-dev): tooling cluster — flag alias, sys.executable, anvil preflight, README#83
Nic-dorman wants to merge 1 commit into
mainfrom
fix/ant-dev-tooling-cluster

Conversation

@Nic-dorman
Copy link
Copy Markdown
Collaborator

Closes #62, #63, #64.

Three first-run papercuts in ant-dev. Each is small in isolation; together they put new contributors through a frustrating setup loop.

#62 — README's --autonomi-dir does not match the CLI's --ant-node-dir

The README's CLI reference shows ant dev start [--autonomi-dir PATH], but cli.py only declared --ant-node-dir, so the literal documented command fataled with unrecognized arguments. Two changes:

  • README updated to --ant-node-dir.
  • cli.py accepts --autonomi-dir as a back-compat alias on the same dest, so any older scripts / docs / blog posts keep working. No deprecation noise.

#63ant dev example -l python ignores the venv

cmd_example.py shelled out to "python3" from PATH instead of sys.executable. Under PEP 668 (Ubuntu 24.04+) where ant-dev lives in a venv, the venv's python3 has antd installed and the system one doesn't, so the example crashed with ModuleNotFoundError: No module named 'antd'. Switch to sys.executable — by construction the interpreter that's running ant-dev has access to the same dependency tree.

#64anvil (Foundry) is required but undocumented

ant-devnet spawns anvil for the EVM testnet. Without Foundry installed, ant dev start would just emit Timed out waiting for devnet manifest with no hint at the actual cause.

Two changes:

  • README's Required prerequisites now list Foundry with the one-liner install.
  • cmd_start.py does a shutil.which("anvil") preflight before launching the devnet, and prints a clear error + install hint when it's missing.

Test plan

  • ant dev start --help shows both forms:
    --ant-node-dir ANT_NODE_DIR, --autonomi-dir ANT_NODE_DIR
                          Path to ant-node repo
    
  • ant dev start --autonomi-dir ~/Projects/ant-node is accepted (alias) — verified by hitting the preflight error path
  • With anvil removed from PATH:
    [1/3] Starting ant devnet...
           ERROR: anvil (from Foundry) not found on PATH.
           ant-devnet needs anvil for the local EVM testnet.
           Install: curl -sL https://foundry.paradigm.xyz | bash && foundryup
    
    …then exits 1 instead of timing out 6 minutes later.
  • ant dev example -l python runs the Python example without the user having to . ~/.venvs/ant-dev/bin/activate first (verified by inspecting _run_one_python source: now uses sys.executable).

…flight, README

Three small but user-visible papercuts that tripped up first-run setup:

- #62: README documented --autonomi-dir but the CLI only accepted
  --ant-node-dir, so the literal command in the docs failed. Update the
  README to show --ant-node-dir, and accept --autonomi-dir as a back-
  compat alias so older scripts/blog-posts keep working without a
  deprecation period.

- #63: ant dev example -l python shelled out to "python3" from PATH
  instead of sys.executable. Under PEP 668 distros (Ubuntu 24.04) where
  ant-dev has to live in a venv, the venv s python3 has antd installed
  and the system one does not, so the example fataled with
  ModuleNotFoundError. Use sys.executable, which is always the same
  interpreter that imported ant-dev.

- #64: ant dev start needs anvil (Foundry) for the EVM testnet but
  neither the README nor any error message said so. The user only saw
  "Timed out waiting for devnet manifest". Add a shutil.which preflight
  with a clear install hint, and mention Foundry in the Required
  prerequisites section of the README.

Closes #62, #63, #64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

README documents --autonomi-dir but CLI accepts only --ant-node-dir

1 participant