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

Stop printing rustc command line if normally errored #5838

Conversation

Mark-Simulacrum
Copy link
Member

We used to print a wall of text especially in larger projects like the
compiler, now we print a much smaller message. It's not generally useful
to know the full compiler command anyway.

Not completely sure this is the best place to have this, but seems to work in local testing.

@rust-highfive
Copy link

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@@ -26,6 +26,9 @@ pub struct ProcessBuilder {
///
/// [jobserver_docs]: https://docs.rs/jobserver/0.1.6/jobserver/
jobserver: Option<Client>,
/// The status code which, if emitted, will prevent the output of the error
/// message containing the built command.
normal_error: Option<i32>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be nicer to keep using ExitStatus here, rather than a raw i32.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT there's no way to construct one

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦‍♂️ sorry

@dwijnand
Copy link
Member

Thinking along the lines of @alexcrichton's comment in #5683 (the arch-rival to this PR), perhaps rather than do an exit code conditional thing the verbose output could be gated on -v (or -vv).

@Mark-Simulacrum
Copy link
Member Author

That does sound like a mostly better idea -- I'll update this PR (and fix tests) soon.

We used to print a wall of text especially in larger projects like the
compiler, now we print a much smaller message. It's not generally useful
to know the full compiler command anyway.
@alexcrichton
Copy link
Member

Hm the intention for Cargo has always been that if -v is passed we print the full rustc command line, and then in practice it ends up being passed very rarely. Something is different about rustbuild though (I forget how) where something is on by default to display more verbose errors. I'd prefer to solve that for rustbuild and keep the current interface of -v means "print the full command line"

@Mark-Simulacrum
Copy link
Member Author

Hm yes looks like this is actually a rustbuild bug. I'll look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants