Bug Description
The version constraints for tree-sitter and tree-sitter-bash in pyproject.toml are too loose (>=0.23 for both). When installed via pip without the uv lockfile, pip's dependency resolver can pick incompatible versions (e.g., tree-sitter==0.24.0 + tree-sitter-bash==0.25.1), causing a crash whenever the bash tool's permission check is triggered.
Steps to Reproduce
- Install iac-code via
pip install iac-code (without using the uv lockfile)
- Verify installed versions:
pip show tree-sitter tree-sitter-bash — may show tree-sitter 0.24.0 and tree-sitter-bash 0.25.1
- Run
iac-code -p "run echo hello" --max-turns 3
Expected Behavior
The bash tool executes the command and returns the result.
Actual Behavior
The CLI crashes with a full traceback:
File ".../iac_code/tools/bash/command_parser.py", line 16, in <module>
_parser = Parser(_BASH_LANGUAGE)
^^^^^^^^^^^^^^^^^^^^^^
ValueError: Incompatible Language version 15. Must be between 13 and 14
Root Cause
In pyproject.toml:
"tree-sitter>=0.23",
"tree-sitter-bash>=0.23",
tree-sitter 0.24.x supports language versions 13-14, but tree-sitter-bash 0.25.x provides language version 15. These two packages must be at compatible versions (both 0.24.x or both 0.25.x).
The uv lockfile correctly resolves to tree-sitter==0.25.2 + tree-sitter-bash==0.25.1, but users installing via plain pip are not protected.
Suggested Fix
Tighten the version constraints to ensure compatibility:
"tree-sitter>=0.25,<0.26",
"tree-sitter-bash>=0.25,<0.26",
Operating System
macOS
Python Version
3.12.7
iac-code Version
0.2.3
LLM Provider
Alibaba Cloud (DashScope / Qwen)
IaC Type
Not applicable
Additional Context
The dev environment (using uv sync with the lockfile) works correctly since uv.lock pins tree-sitter==0.25.2 and tree-sitter-bash==0.25.1. This only affects users who install via pip install iac-code directly.
Bug Description
The version constraints for
tree-sitterandtree-sitter-bashinpyproject.tomlare too loose (>=0.23for both). When installed viapipwithout the uv lockfile, pip's dependency resolver can pick incompatible versions (e.g.,tree-sitter==0.24.0+tree-sitter-bash==0.25.1), causing a crash whenever the bash tool's permission check is triggered.Steps to Reproduce
pip install iac-code(without using the uv lockfile)pip show tree-sitter tree-sitter-bash— may showtree-sitter 0.24.0andtree-sitter-bash 0.25.1iac-code -p "run echo hello" --max-turns 3Expected Behavior
The bash tool executes the command and returns the result.
Actual Behavior
The CLI crashes with a full traceback:
Root Cause
In
pyproject.toml:tree-sitter0.24.x supports language versions 13-14, buttree-sitter-bash0.25.x provides language version 15. These two packages must be at compatible versions (both 0.24.x or both 0.25.x).The uv lockfile correctly resolves to
tree-sitter==0.25.2+tree-sitter-bash==0.25.1, but users installing via plainpipare not protected.Suggested Fix
Tighten the version constraints to ensure compatibility:
Operating System
macOS
Python Version
3.12.7
iac-code Version
0.2.3
LLM Provider
Alibaba Cloud (DashScope / Qwen)
IaC Type
Not applicable
Additional Context
The dev environment (using
uv syncwith the lockfile) works correctly sinceuv.lockpinstree-sitter==0.25.2andtree-sitter-bash==0.25.1. This only affects users who install viapip install iac-codedirectly.