Skip to content

Improve error messages for yaml parse errors #2374

@sjakobi

Description

@sjakobi
~/t/yaml-error $ cat stack.yaml 
resolver: lts-6.7
packages:
  - location: git: https://github.com/commercialhaskell/stack
~/t/yaml-error $ stack build
Could not parse '/home/simon/test/yaml-error/stack.yaml':
InvalidYaml (Just (YamlParseException {yamlProblem = "mapping values are not allowed in this context", yamlContext = "", yamlProblemMark = YamlMark {yamlIndex = 45, yamlLine = 2, yamlColumn = 17}}))
See http://docs.haskellstack.org/en/stable/yaml_configuration/.

At least we could use yaml's prettyPrintParseException to format the exception more nicely.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions