Skip to content

Unhelpful messages when the manifest deserialization fails #239

@raymondk

Description

@raymondk

For eg:

environments:
  - name: local
    network: mainnet

With a manifest like this, the error will look like this:

DEBUG icp: Starting icp-cli version="v0.1.0-beta.1+rev5.dirty-a6057ef" git_sha="a6057efda785212611ef4783c8fc3d791351ccae" command=Project(Show(ShowArgs))
DEBUG icp: Loading project
DEBUG icp: Located icp project in /Users/raymond/tmp/my-motoko
Error: failed to load project

Caused by:
    0: failed to load project manifest
    1: failed to parse manifest at '/Users/raymond/tmp/my-motoko/icp.yaml'
    2: environments: data did not match any variant of untagged enum Item at line [...]

Even though we properly raise an this error

This is because serde ends up swallowing the variant errors....

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