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
Comments
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. |
Removed Priority-Medium label. |
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 ;) |
Added Fixed label. |
Fixed by r11643. |
This issue has been moved to dart-lang/pub#78. |
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"
The text was updated successfully, but these errors were encountered: