Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide more helpful error message when name: is missing from pubspec #4806

Closed
sethladd opened this issue Aug 29, 2012 · 6 comments
Closed
Labels
P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug

Comments

@sethladd
Copy link
Contributor

name: is now a required top-level field in the pubspec.yaml file.

Suggest making a more helpful error message when name: is missing.

Perhaps:

"Missing a required top-level name: key in the [path to file] pubspec"

@nex3
Copy link
Member

nex3 commented Aug 29, 2012

Why is that more helpful than '"[path to file]" must contain a "name" key'? It looks like it's just a re-ordering of the sentence without adding any new information.

It would help if I knew what Shannon found unclear about the error message.

@sethladd
Copy link
Contributor Author

Removed Priority-Medium label.
Added Priority-Low label.

@DartBot
Copy link

DartBot commented Aug 30, 2012

This comment was originally written by jjinux...@google.com


The problem was that I didn't know what a '"name" key' was. "Key" can have so many meanings, so that didn't help matters. I kept trying to figure out how my pubspec.yaml file could have broken since I didn't change it--i.e. it wasn't clear to me that this was a new requirement. I definitely had no clue how to resolve the situation. For instance, it'd be great if it told me to add a line to the pubspec.yaml file like "name: the-name-of-your-project". Also, searching the documentation and Googling for this error didn't help, although I'm guessing those two problems will be taken care of very quickly ;)

@nex3
Copy link
Member

nex3 commented Aug 30, 2012

Added Fixed label.

@nex3
Copy link
Member

nex3 commented Aug 30, 2012

Fixed by r11643.

@DartBot
Copy link

DartBot commented Jun 5, 2015

This issue has been moved to dart-lang/pub#78.

@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants