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.
I am opening this pull request to discuss the idea of improving (and "opening") the
YamlError
ADT.Currently, only "ascii" messages are provided to the end users. So after calling a method like
asNode
on aString
, all underlying information (position of the error, token responsible, expected token kind) are no more available.The
ParseError
is the most obvious enhancement, but the same philosophy can probably be applied to others, like theComposeError
, for example.This will be a (slight) breaking change (in the case people were destructuring the
ParseError
case class in a match statement, for example) but since it will only lead to compile-time error, I don't think it's a big deal.I'm adding a regression test to verify that the actual error message did not change (and will not, at least not unwillingly).