Skip to content

Fix silent codegen errors on syntax errors#1899

Merged
JakeDawkins merged 6 commits intomasterfrom
jake/codegen-silent-syntax-errors
Jun 3, 2020
Merged

Fix silent codegen errors on syntax errors#1899
JakeDawkins merged 6 commits intomasterfrom
jake/codegen-silent-syntax-errors

Conversation

@JakeDawkins
Copy link
Copy Markdown
Contributor

resolves #1897

During document parsing, syntax errors are silently
added to the document, but errors are never thrown.

This PR checks at the command-level for these errors
and if they exist, prints them to the user.

I didn't want to change at the document setup level, because
I have a feeling the silent erroring was intention for the sake
of the operation registry or something. So I added in an error
where it was immediately causing an issue, in the client
codegen command.

TODO:

  • Update CHANGELOG.md* with your change (include reference to issue & this PR)
  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests and linter rules pass

*Make sure changelog entries note which project(s) has been affected. See older entries for examples on what this looks like.

During document parsing, syntax errors are silently
added to the document, but errors are never thrown.

This PR checks at the _command-level_ for these errors
and if they exist, prints them to the user.

I didn't want to change at the document setup level, because
I have a feeling the silent erroring was intention for the sake
of the operation registry or something. So I added in an error
where it was immediately causing an issue, in the client
codegen command.
@apieceofbart
Copy link
Copy Markdown

@JakeDawkins what's stopping you from merging that? Do you need help?

@JakeDawkins
Copy link
Copy Markdown
Contributor Author

Sorry for the hold-up @apieceofbart, it's been a while since I've had the time to even look at this 😅

After making a quick second-pass, I think this is safe to merge through

@JakeDawkins JakeDawkins merged commit ea1e0f4 into master Jun 3, 2020
@JakeDawkins JakeDawkins deleted the jake/codegen-silent-syntax-errors branch June 3, 2020 17:34
@apieceofbart
Copy link
Copy Markdown

Thank you!

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.

Missing closing brace in GQL input does not emit error

2 participants