Skip to content

feat: semantic diagnostics from comline-core's validation pass - #2

Merged
Kinflou merged 1 commit into
masterfrom
feat/semantic-diagnostics
Sep 2, 2026
Merged

feat: semantic diagnostics from comline-core's validation pass#2
Kinflou merged 1 commit into
masterfrom
feat/semantic-diagnostics

Conversation

@Kinflou

@Kinflou Kinflou commented Sep 2, 2026

Copy link
Copy Markdown
Member

Diagnostics were syntax-only. Once a document parses cleanly, the server now interprets it (IncrementalInterpreter::from_declarations) and runs comline_core::schema::ir::validation::validate — surfacing undefined type references, duplicate declarations, and the rest of the checks comline build runs, each placed by its ValidationError's byte span.

  • analysis/diagnostics.rs: validation_diagnostics + all_diagnostics (parse errors first; validation only when the tree is well-formed).
  • backend.rs: parse_and_publish_diagnostics calls all_diagnostics.
  • tests: undefined type, duplicate declaration, clean schema, and "malformed tree ⇒ validation skipped, no panic". 49 tests green.

Now the editor shows the same errors as the CLI, live.

Diagnostics were syntax-only. Once a document parses cleanly, the server
now interprets it (`IncrementalInterpreter::from_declarations`) and runs
`comline_core::schema::ir::validation::validate` — surfacing undefined
type references, duplicate declarations, and the rest of the checks
`comline build` runs, placed by each `ValidationError`'s byte span.

  - analysis/diagnostics.rs: `validation_diagnostics` + `all_diagnostics`
    (parse errors, then validation only if the tree is well-formed).
  - backend.rs: `parse_and_publish_diagnostics` calls `all_diagnostics`.
  - tests: undefined type, duplicate declaration, clean schema, and
    "malformed tree ⇒ validation skipped, no panic".
@Kinflou
Kinflou merged commit 7cbc6d5 into master Sep 2, 2026
2 checks passed
@Kinflou
Kinflou deleted the feat/semantic-diagnostics branch September 2, 2026 09:39
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.

1 participant