-
Notifications
You must be signed in to change notification settings - Fork 13.3k
build the compiler with --cfg debug #8181
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
Comments
+1 |
@brson you're just talking about a special configure setting for building the snapshot compiler, right? (As opposed to changing the defaults for the configure script across the board?) |
I think that this would be better implemented with Also the |
I'm still trying to figure out what the scope of this bug actually is; as I asked @brson, is this request merely for a change to how the snapshot But, allowing for a bit of scope creep beyond that for a moment... : @alexcrichton When you say "Almost everyone expects debug output by default", do you mean rustc-hackers expecting debug output from invocations of For Rust programmers, I support making the expected common case, whatever it may be, as painless as possible, which could imply switching to Also, are you suggesting that people write As you probably have inferred, I personally don't mind the current |
I was intending more of rust programmers in general because this affects the output of That being said, you're right about now "debug code" is hidden behind Although The problem that I've seen is that it's very easy to forget the |
@alexcrichton so it looks to me like you have landed PR #9278 and are in the process of proposing PR #9385 . Its unfortunate that neither of those Pull Requests mentioned this ticket, so I didn't get a direct notification. From skimming PR #9278, it looks like you simply accepted the Finally, PR #9278 seems to contradict directly the intent of PR #7822. I do not mind having the (Sorry if the above note sounds curt; maybe there had been consensus amongst the group in California and I simply missed it since it was not logged here.) |
(BTW Its certainly possible that I misunderstand the intended scope of #7822. There's not much context there to work with.) |
After some reflection, it does not seem like a terrible burden to require end-users to opt into I'm still not a fan of the I do not know whether @pcwalton's interest in conditionalizing So, I'll stop making noise about this. |
Gah, sorry about that! I totally forgot to cc this bug. There wasn't really an "official" consensus per se, more of a general feeling of agreement, and I'd be ok with reverting these in the meantime if there are strong feelings to be had. That being said, I don't think that this really contradicts #7822. It's more of another way to go about solving it. In #7822, the compiler would be "fast by default", and now it's just "verbose by default, which may not be fast". For performance, we still have the option to omit the I also still agree that As for #9385, that's simply a mistake on my part of overlooking that debug output wasn't enabled by default for the compiler. I was curious why we didn't see a spike in compile-times when the previous pull request landed, but when #9385 lands we should see a spike. To go back to normal we'd just need to pass Again though, sorry about forgetting to cc this here, I should have at least but "cc #8181" on one of the pulls :(. |
How about this for the Then in our own code base, we can continue writing Does that sound okay? (I know this only "solves" the problem for the rustc code base, apart from providing one pattern that others can choose whether or not they want to follow it, or invent other idioms. For now, my main goal is to try to enable our code base to be clean.) |
I'm totally OK with that. I suppose we could try it out and if it's super nice we may want to consider making it an actual language thing, but I don't think that'll happen soon... |
(i wouldn't want to make it a language thing anyway. :) I'll put up a PR soon.) |
I could imagine that |
@huonw I wouldn't object to (I'm less sure about the semi-analogous question of whether the absence of |
This is essentially done. Instead of Debug-info is another story, bug I think that today's incarnation of the compiler we have enough default logging as is. |
Fixed some typos in README and CONTRIBUTING changelog: none
I hit a trans bug in stage0 today and I have pretty much no way of figuring out what's going on because it has no logging.
The text was updated successfully, but these errors were encountered: