Troubleshooting¶
Installation¶
pip install 'git+https://github.com/TuviDev/infra-lang.git'fails → ensure Python 3.11+ (python --version).infra: command not foundafter install → the console-script dir isn't onPATH; install withpython -m pip install --user infra-langor usepython -m infra.- LSP not available → install with
pip install 'git+https://github.com/TuviDev/infra-lang.git[lsp]'.
LSP / VS Code¶
- Diagnostics not showing → check
infra-langis installed and the extension Python haspygls. Verify:python -m infra.lsp.server(must not raise ImportError). Select the interpreter in VS Code (Ctrl+Shift+P→ "Python: Select Interpreter"). - Extension not activating → file must end in
.infra(not.inf). - No completion/symbols → confirm the extension version matches this package.
Compile failures¶
Service 'x' has neither image nor build→ everyserviceneedsimage:orbuild.Compilation aborted: N error(s)→ runinfra validateto see all errors at once (the validator collects multiple errors; the parser stops at the first syntax error).
Output directory (infra-out/)¶
infra-out/ (or a custom --output dir) accumulates artifacts from
previous compiles: compiling to a different backend does not clear the old
files. This is intentional — the compiler never deletes files it did not write
to avoid accidentally removing user content (e.g. with --split).
If you inspect the output directory and see stale files from an earlier target
(e.g. an infra.yaml left over after compiling to compose), that is expected.
To compare targets cleanly:
- use a separate output dir per backend, e.g.
--output infra-out/k8sand--output infra-out/compose, or rm -rf infra-outbefore recompiling for a fresh comparison.
Validation / lint¶
error[E011] replicas must be >= 1→ setreplicas: 1or higher.SEC003(mutable tag) → use an immutable tag likenginx:1.25.3.SEC001(hardcoded secret) → usefrom secretorfrom env.- These are guidance; only
Error-severity findings block compilation.
Telemetry / feedback¶
infra feedbackshows status. Enable withinfra feedback --on.- Feedback is off by default and never sends source code or paths.
Reporting a bug¶
Use the issue templates in .github/ISSUE_TEMPLATE/. A good report includes:
infra --version, Python version, OS, and the target backend.- The minimal
.infrafile that reproduces the issue. - The exact command run and the full output.
- Whether it happens always or intermittently.
Choose the right category (parser / compiler-backend / linter / LSP-VS Code / CLI / docs) so it reaches the right maintainer quickly.