Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Add recovery support to the parser #102

@bwilkerson

Description

@bwilkerson

We are using the YAML parser for development-time support, including code completion, and this requires the parser to be able to recover well in the face of errors in order to provide the best UX.

I believe that naively adding recovery would be a breaking change because the parser would begin to return guesses for what it thinks the user intended to type in situations where it previously would have returned null. I believe, however, that we can make it a non-breaking change by putting recovery behind a flag that is optionally passed to the loadYaml* functions (something like bool recover = false).

Extending the API in this way would also allow us to incrementally implement recovery based on which failure cases occur most often.

Does that seem like a reasonable approach?

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions