Skip to content

Rustdoc error messages are not consistent #38084

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

Closed
ghost opened this issue Nov 30, 2016 · 4 comments
Closed

Rustdoc error messages are not consistent #38084

ghost opened this issue Nov 30, 2016 · 4 comments
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@ghost
Copy link

ghost commented Nov 30, 2016

While playing around with rustdoc, trying to find some things out, most errors are not consistent, especially with the new error formatting. Also, since passes are well-defined, listing them can help, especially in an offline scenario.

A small example: (The last one has colours, per the new error format I presume)

$ rustdoc
expected an input file to act on
$ rustdoc --passes
Argument to option 'passes' missing.
$ rustdoc --passes foo src/bar.rs
ERROR:rustdoc: unknown pass foo, skipping
$ rustdoc --passes foo src/non-existing
error: couldn't read "src/bad.rs": No such file or directory (os error 2)
@GuillaumeGomez
Copy link
Member

cc @jonathandturner @rust-lang/docs

@sophiajt
Copy link
Contributor

@GuillaumeGomez rustdoc is maintained by the tools team.

cc @rust-lang/tools

@frewsxcv frewsxcv added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Nov 30, 2016
@GuillaumeGomez
Copy link
Member

@jonathandturner: And by the @rust-lang/docs as well. ;) Thanks for adding the tools team!

@Michael-Zapata: If you have something in mind, just open a PR and I (and others) will help you on it to reach a better outcome.

bors added a commit that referenced this issue Dec 13, 2016
…GuillaumeGomez

feat(rustdoc): harmonise error messages

Based on unix tools wording, it follows a standard format: `program_name: context: error message`, potentially prompting the user to use the `--help` option.

This is clearly meant to trigger some discussion on #38084, as messages still use `stdout` and `stderr` somewhat arbitrarily, and there are a few `error!()` calls as well.
@ghost
Copy link
Author

ghost commented Dec 13, 2016

Closing as solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants