Repository navigation
feat: add the corrective fact to CLI failure diagnostics - #39
Merged
Merged
Conversation
Unreadable configuration files and schema or queries sources, and failures to create an output directory, write a generated file, read or write the output manifest, or delete a stale generated file now end with the reason the filesystem reports. A malformed configuration file reports the YAML problem with its one-based line and column.
A schema syntax error states the unexpected token with its line and column instead of "Failed to parse schema", and a query syntax error states the parser's reason after the query's header location. A lexical error such as an unterminated string literal uses the parser's own wording, so no diagnostic names a parser exception class.
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
sqlcj generatealready reported each failure as a singlesqlcj:line naming the failing file, but many messages stopped there, and SQL syntax errors either said onlyFailed to parse schemaor leaked a parser exception class name. Every configuration, source, SQL syntax, and output diagnostic now keeps its existing prefix and ends with the fact that explains the failure, so the message says what to fix.Changes
No such file or directoryorIs a directory.1for every failure category and show the new messages.Scope and non-goals
1are unchanged; only the trailing fact is new.