Error: Syntax error during AsciiDoc AST parsing
--> docs/chapters/02-architecture.adoc:42:15
|
42 | [source,python
| ^
| Unclosed block attribute delimiter; expected ']'Compiler Diagnostics & Troubleshooting
Golem is engineered with compiler-grade error reporting and actionable diagnostic coordinates. Instead of failing with opaque Python stack traces, Golem identifies the exact file, line, and column position of syntax errors and unresolvable dependencies.
1. Understanding Compiler Diagnostics
When Golem encounters a syntax error, attribute misconfiguration, or unresolvable include directive, it formats a diagnostic report modeled after modern compilers (like Clang and Rustc):
Diagnostic Anatomy
- Target File Path:
docs/chapters/02-architecture.adoc - Line & Column Position: Line 42, Column 15 (
path:line:col). - Source Context Window: Up to 3 lines of source code surrounding the failure.
- Caret Indicator (
^): Points directly to the offending character or token. - Diagnostic Message: Explanation of the syntax requirement.
3. Debugging Incremental Cache & DAG Dependencies
Golem caches parsed ASTs and semantic graphs in .golem/cache.json.
- Forced Clean Build: If you suspect cached state is stale after moving files or renaming branches, run:
golem build --clean - Strict Mode Verification: Use strict mode locally before pushing commits:
golem build --strict
4. Development Server Live-Reload Diagnostics
When running golem serve, syntax errors do not crash the local server. Instead, Golem injects an interactive error overlay directly into your browser via Server-Sent Events (SSE), displaying the diagnostic traceback until the offending file is saved with valid syntax.