| Ticket Hash: | f3778c55ab16d5c0f989b492436dceefd2f3e91b | ||
| Title: | LSP unit 4: textDocument diagnostics via crystal build --no-codegen | ||
| Status: | Active | Type: | Feature_Request |
| Severity: | Normal | Priority: | Medium |
| Subsystem: | Resolution: | ||
| Last Modified: |
2026-09-20 14:44:08 51.7 days ago |
Created: |
2026-07-07 23:18:12 126.4 days ago |
| Version Found In: | |||
| Description: | ||||
| Fourth unit of ticket 7d8c7145c436, depends on LSP unit 1. On `textDocument/didSave` (add didSave to the sync capabilities), run `crystal build --no-codegen --error-format json` against the workspace entrypoint (or the saved file when no shard.yml target), parse the JSON error output (each item has file/line/column/size/message), and publish `textDocument/publishDiagnostics` notifications per file; empty diagnostics on success to clear stale squiggles. Guard with a timeout and one-build-at-a-time (drop intermediate saves). Spec: fixture file with a deliberate type error, fake a didSave, assert a publishDiagnostics notification for that URI carrying the error line + message; then a corrected file yields an empty diagnostics list. Map compiler output only — no custom analysis. | ||||