Skip to content

Malformed YAML can produce confusing errors #17

@jkachmar

Description

@jkachmar

When a user supplies curator with malformed YAML, it returns the parse errors from the yaml package verbatim, with little to no additional context.

For example, given this malformed input to build-constraints.yaml:

# Constraints for brand new builds
packages:
  "Alice Roberts" <alice@roberts.com> @aroberts":

...curator will produce the following error (or similar):

curator: InvalidYaml (Just (YamlParseException {yamlProblem = "did not find expected key", yamlContext = "while parsing a block mapping", yamlProblemMark = YamlMark {yamlIndex = 388, yamlLine = 11, yamlColumn = 18}}))

It's entirely reasonable that this issue is outside of the scope of curator, since it would rely on yaml returning more structured information for us to turn into a more meaningful response.

This was just reported in commercialhaskell/stackage#5520, and I figured this would be a better place to open a discussion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions