Skip to content

Better error messages when failing to parse pubspec #4474

Open
@sigurdm

Description

@sigurdm
# pubspec.yaml:
name: blah
environment:
  sdk: ^3.6.0
dependencies:
  build:
    git: https://github.com/dart-lang/build
> dart pub get
Resolving dependencies... 
(53.5s)
Error on line 1, column 7: "name" field doesn't match expected name "build".

1 │ name: build_workspace     # Can be anything
  │       ^^^^^^^^^^^^^^^

Would be nice to show the path of inclusion to parsing the dependency.

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