4 ms·
One of the smartest things I think the rust project has done, is made it so that when the compiler hits an unexpected error it tells you unambiguously that it's
by gpm 7y ago
One of the smartest things I think the rust project has done, is made it so that when the compiler hits an unexpected error it tells you unambiguously that it's a bug, and asks you to report it. It avoids any question of "well maybe I screwed up, and the compiler did the right thing by crashing". Sure, you might have screwed up, but so did the compiler even if just by printing the wrong message.
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
- ambrop7 7y agoGCC has had this since forever: cc: internal compiler error: Segmentation fault (program cc1) Please submit a full bug report, with preprocessed source if appropriate. See <URL> for instructions. (the URL may be customized by the distro)
- rurban 7y agoStill I would never file a bug report to GCC. Hostile community, hostile bug tracker, hard to reduce test cases to an acceptable state. clang is way better in this.
- hinkley 7y agoNpm tries, but there’s often such a wall of text that people can’t sort it out and ask me instead.
- sverhagen 7y agoI feel I've hit an error in npm regularly that said it was a bug in the tool, for it still to end up my mistake. While you may well have gotten the tool into an unsupported state, you were never supposed to get there. That makes these "it's a bug" messages less useful to me.
- hirsin 7y agoYou still found a bug - the error claimed it was a bug, but it wasn't! The point of technical error messages, imo, is to tell the developer what they did wrong to get into this state. They can't be allowed to be wrong, otherwise developers stop trusting them (this bites us a lot - we get dozens of incidents along the line of "error says very specific thing related to my scenario is configured wrong - is it actually?")
- tick_tock_tick 7y agoHonestly this is an example of exactly what the OP is saying is bad behavior. The link to actually create a bug report doesn't even show up til the 5th paragraph and clicking on that link just takes you to a github sign-in page.
- hcs 7y agoIt may not be optimally helpful, but it's one of the articles's recommendations: > So, what can you do? You can encourage people to report bugs. I visibly write in my GitHub README that reporting bugs is encouraged and welcome: “Please tell me if something is wrong, you’re helping me make this project better.” Nothing in the post is about frictionless report submission, mostly observation that if something is broken most users won't bother reporting it. If the suggestion has been made that bug reports are welcome, that might help, and a good place to make that suggestion is in an error message, especially for a development tool (though it is also in the main README).
- kps 7y agoAnd the link to …/CONTRIBUTING.md#bug-reports doesn't actually work, because the relevant heading has id=user-content-bug-reports" rather than id="bug-reports".
- gpm 7y agoAre you sure about that? I just tested to be sure, and it works for me (with firefox). I agree that the id in the html is "user-content-bug-reports", but for some reason the link works anyways. Further if you hover over the heading github displays a link icon to its left, and it points at #bug-reports.
- kps 7y agoHmm, you're right; there's an href="#bug-reports" that is somehow ineffective on my other machine.