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

Invert --cfg debug to --cfg ndebug #9278

Merged
merged 1 commit into from
Sep 20, 2013
Merged

Conversation

alexcrichton
Copy link
Member

Many people will be very confused that their debug! statements aren't working
when they first use rust only to learn that they should have been building with
--cfg debug the entire time. This inverts the meaning of the flag to instead
of enabling debug statements, now it disables debug statements.

This way the default behavior is a bit more reasonable, and requires less
end-user configuration. Furthermore, this turns on debug by default when
building the rustc compiler.

@huonw
Copy link
Member

huonw commented Sep 18, 2013

Is it worth compiling with --enable-debug by default while rustc still has loads of bugs? (i.e. invert the flag and replace it with --disable-debug, like this patch is doing for debug!?)

@alexcrichton
Copy link
Member Author

This actually changes the default from --disable-debug to --enable-debug

@huonw
Copy link
Member

huonw commented Sep 18, 2013

Oh,

Furthermore, this turns on debug by default when building the rustc compiler.

Reading is complicated sometimes.

Many people will be very confused that their debug! statements aren't working
when they first use rust only to learn that they should have been building with
`--cfg debug` the entire time. This inverts the meaning of the flag to instead
of enabling debug statements, now it disables debug statements.

This way the default behavior is a bit more reasonable, and requires less
end-user configuration. Furthermore, this turns on debug by default when
building the rustc compiler.
bors added a commit that referenced this pull request Sep 20, 2013
Many people will be very confused that their debug! statements aren't working
when they first use rust only to learn that they should have been building with
`--cfg debug` the entire time. This inverts the meaning of the flag to instead
of enabling debug statements, now it disables debug statements.

This way the default behavior is a bit more reasonable, and requires less
end-user configuration. Furthermore, this turns on debug by default when
building the rustc compiler.
@bors bors closed this Sep 20, 2013
@bors bors merged commit 833a64d into rust-lang:master Sep 20, 2013
@huonw huonw mentioned this pull request Sep 29, 2013
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