volta-cli / rfcs

RFCs for changes to Volta
Other
17 stars 14 forks source link

RFC: Helpful Error Messages #31

Closed charlespierce closed 5 years ago

charlespierce commented 5 years ago

Improve error messages so that users are better able to understand and troubleshoot what went wrong.

Rendered

dherman commented 5 years ago

Some questions worth addressing:

Especially when considering some of these visual questions, some screenshots could be helpful to make the RFC more concrete.

Also, let me suggest one strategy for making progress on the prose style: you could do a first pass through the ErrorDetails enum, grabbing a set of maybe 5 - 10 errors that cover a reasonably diverse range of different kinds of errors, and try to develop specific error messages for each and include them in this RFC. That would help start to establish a prose style, and might help us to divide up the work on the remaining cases.

charlespierce commented 5 years ago

Updated to cover the style questions. I like the idea of tackling a few selected errors and taking screenshots to help illustrate the new messages, I'll work on that this week.

chriskrycho commented 5 years ago

Should we have a fixed line length, or hard wrap based on the current console's dimensions?

Using textwrap (and probably others; that's just the one I've played with) you can fairly easily set a max width of e.g. 72 characters for legibility, but wrap if the terminal is narrower than that.

rwjblue commented 5 years ago

Seems like this has landed already (https://github.com/volta-cli/volta/pull/344, https://github.com/volta-cli/volta/pull/340, https://github.com/volta-cli/volta/pull/342, https://github.com/volta-cli/volta/pull/338, https://github.com/volta-cli/volta/pull/339, https://github.com/volta-cli/volta/pull/337, https://github.com/volta-cli/volta/pull/336, https://github.com/volta-cli/volta/pull/326, https://github.com/volta-cli/volta/pull/328), any reason not to merge the RFC?

dherman commented 5 years ago

@rwjblue ya, should've been merged already. Doing it now!