Repository navigation
feat: render comline-core's diagnostics properly in the CLI (Phase 3) - #46
Merged
Merged
Conversation
added 2 commits
October 5, 2026 19:02
Bumps the comline-core/comline-codegen pins to core#69 (Phase 1+2 of the
error-reporting work: parse errors now render as real ariadne source
snippets instead of Debug-dumped Vec<ParseError>s, routed through one
shared Diagnostic type).
core_err now branches on whether the wrapped error's detail is multi-line
- a rendered snippet gets its own paragraph instead of being glued onto
the "<context>: " prefix on one line. The per-language-generator error
bridge in generate.rs is left alone (documented why: those errors are
about schema/package structure, not source text, so they carry no span to
render a snippet against).
New integration tests reproduce the exact reported bug end-to-end through
the real CLI binary, for both a broken schema and a broken config.idp,
asserting stderr never contains "ParseError {"/"FailedNode(" and does
contain the filename plus a line:column-shaped location.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 3 of the error-reporting plan — the CLI bridge. Bumps
comline-core/comline-codegenpins to core#69, which brings Phase 1+2's work: parse errors now render as realariadnesource snippets (line:column, caret) instead of a Debug-dumpedVec<ParseError>, routed through one sharedDiagnostictype.core_errnow branches on whether the wrapped error's detail is multi-line — a rendered snippet gets its own paragraph instead of being glued onto the"<context>: "prefix on one line.generate.rs:194) is left alone, with a comment explaining why: those errors are about schema/package structure, not source text — no span to render a snippet against.miette::Diagnostic/SourceCode/#[label]wrapping needed, and nomiette::set_hookinstallation — the string arriving fromcomline-coreis already fully rendered, terminal-ready text.Test plan
cargo build(singlecomline-core/comline-codegenresolved)cargo test(65 passing, no regressions)cargo clippy --all-targets(no new warnings)config.idp), asserting stderr never contains"ParseError {"/"FailedNode("and does contain the filename plus a line:column-shaped location