Skip to content

Improve error message for invalid dependency #4925

@giacomocavalieri

Description

@giacomocavalieri

Right now if I try and use a git dependency and mess up one of the fields the error I get looks like this:

error: File IO failure

An error occurred while trying to parse this file:

    /Users/giacomocavalieri/Documents/progetti/giacomocavalieri.me/gleam.toml

The error message from the file IO library was:

    TOML parse error at line 6, column 7
  |
6 | jot = { a = "58499d73c0a980f4d6cfb04b7cbfab9198238b76" }
  |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
data did not match any variant of untagged enum Requirement

That big underline is not all that useful and is talking about compiler internals, I think it would be nice if it provided a better error message here. Not sure what it would look like!

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedContributions encouraged

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions