Skip to content

On compiler error, the compiler says "try running with RUST_LOG=rustc=1": does that do anything? #10906

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
wackywendell opened this issue Dec 10, 2013 · 6 comments

Comments

@wackywendell
Copy link
Contributor

I got a compiler error earlier, and noted that it said `note: try running with RUST_LOG=rustc=1 to get further details and report the results to github.com/mozilla/rust/issues'. I did run it like that:

$ rustc --lib "mdsim2.rs" 
task 'rustc' failed at 'index out of bounds: the len is 26499407 but the index is 26499407', /build/rust-git/src/rust/src/libextra/ebml.rs:100
error: internal compiler error: unexpected failure
This message reflects a bug in the Rust compiler. 
We would appreciate a bug report: https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1 to get further details and report the results to github.com/mozilla/rust/issues
task '<main>' failed at 'explicit failure', /build/rust-git/src/rust/src/librustc/lib.rs:393
$ RUST_LOG=rustc=1 rustc --lib "mdsim2.rs" 
task 'rustc' failed at 'index out of bounds: the len is 26499407 but the index is 26499407', /build/rust-git/src/rust/src/libextra/ebml.rs:100
error: internal compiler error: unexpected failure
This message reflects a bug in the Rust compiler. 
We would appreciate a bug report: https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1 to get further details and report the results to github.com/mozilla/rust/issues
task '<main>' failed at 'explicit failure', /build/rust-git/src/rust/src/librustc/lib.rs:393
$ env RUST_LOG=rustc=1 rustc --lib "mdsim2.rs" 
task 'rustc' failed at 'index out of bounds: the len is 26499407 but the index is 26499407', /build/rust-git/src/rust/src/libextra/ebml.rs:100
error: internal compiler error: unexpected failure
This message reflects a bug in the Rust compiler. 
We would appreciate a bug report: https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1 to get further details and report the results to github.com/mozilla/rust/issues
task '<main>' failed at 'explicit failure', /build/rust-git/src/rust/src/librustc/lib.rs:393

No new files were created in that directory, and I have no idea what that command did. Perhaps that note in the compiler could be clarified (or removed if it doesn't do anything)?

@alexcrichton
Copy link
Member

This is all working as intended. The compiler may print more diagnostic information depending on certain types of errors, but in this case it appears that the compiler did not deem it relevant to print more information.

@wackywendell
Copy link
Contributor Author

OK, but perhaps it should note that? Right now, it still gives the note try running with RUST_LOG=rustc=1 even when you are running with that; there is no indication that you have turned that option on, and a continued indication that you should turn it on. It seems to me that anyone not well versed in how the compiler works would find that confusing...

@pnkfelix
Copy link
Member

we could improve the output message slightly here, though i'm not sure it will matter too much.

@metajack
Copy link
Contributor

I feel like this message is basically useless and I pretty much totally ignore it. I think we should just remove it until we have error codes that we can link to documentation pages for or something.

Does anyone use this diagnostic at all in practice?

@pnkfelix
Copy link
Member

@metajack I think I have seen some bug reports that have had helpful debug information included in them due to the use of RUST_LOG, but I don't know if they were these uses of RUST_LOG. (E.g. I don't know if the instructions provided by the message actually correspond to what is helpful to us.)

Still I think its worthwhile to give people a hint as to what they might investigate if they want to do more investigation on their own. WIthout the RUST_LOG message from rustc, it might have been a lot longer before I started using its various modes for accessing the logging instrumentation in the binaries. So I'd still be in favor of keeping some sort of message.

@ghost
Copy link

ghost commented Dec 11, 2013

Perhaps this message should instruct the user to play around with RUST_LOG=::help, and that message in turn should be more helpful. Summarize the general usage of RUST_LOG, link the user to the appropriate section of the manual, etc.

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

No branches or pull requests

4 participants