-
Notifications
You must be signed in to change notification settings - Fork 13.3k
std: Remove fortune cookies from fatal runtime errors #20944
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
std: Remove fortune cookies from fatal runtime errors #20944
Conversation
r? @huonw (rust_highfive has picked a reviewer for you, use r? to override) |
Boooooo. (edit: In eulogy: one of the first things I worked on w/ Rust was the Matasano crypto challenges. I spent a lot of time fighting the compiler trying to learn the basics, get past the borrow checker, and work through the occasional ice, but for the most part made pretty decent progress. I finally did something that managed to get a Lovecraft quote, but it took me maybe a good 5 minutes to realize that it was a runtime error and not a sudden shift in theme in the challenge answers. Might have been my first <3 Rust moment.) |
Instantly r+'d by the PR author... this kind of totalitarian management of the project won't stand! 😈 |
I'll always remember coming back to an attempt to compile |
😢 rip. I only got a Lovecraft quote once ever, but it was pretty much my favorite Rust moment ever. |
@@ -144,56 +144,6 @@ pub fn abort(args: fmt::Arguments) -> ! { | |||
let _ = write!(&mut w, "{}", args); | |||
let msg = str::from_utf8(&w.buf[0..w.pos]).unwrap_or("aborted"); | |||
let msg = if msg.is_empty() {"aborted"} else {msg}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All this logic is not necessary anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eddyb It seems to cover real cases: the first if the buffer is not utf8 (though with fmt changing to require utf8 maybe that's impossible), and the second if the abor t message is empty. Neither of those seem to be related to the easter egg.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I meant the whole writing to a buffer thing. That was only done for the fortune hash. Can just write the format args to stderr now.
I'm against this change. If anything we should be encrypting the text so that they are truly Easter eggs. |
@tshepang: bors also allows r=litterallyAnything; it is not built to have any particular security model other than "I listen to those with authority". |
👏 👍 👏 |
Why couldn't we just remove the text for non-debug builds? |
I sympathize with the "2k is significant on some platforms" argument, but I am rather saddened to see this go. I do wish it could exist only for non-debug builds. Though offhand I'm not sure how that would be possible. I'm also confused as to how this was ending up in |
Nice to see useless code gone! |
FTR, this PR is mentioned in Long Live Software Easter Eggs (ACM Queue, 2022)
|
Closes #13871