-
Notifications
You must be signed in to change notification settings - Fork 37.7k
build: suppress external warnings by default #27872
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
build: suppress external warnings by default #27872
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
I think there is still a benefit to developers being notified about warnings in headers. Otherwise no one may notice the false warnings and report them upstream. Also, if they point to real problems, it will be harder to track them down. |
They can still be notified, by disabling the suppression.
Then we should stop suppressing them globally in the CI, so we are more likely to see (and then report) the warnings across all relevant platforms / arches. Although then we can't use |
Also, it may be good to give some more background. IIRC this is only needed for bdb4 and qt5, so someone compiling bitcoind with sqlite shouldn't have to suppress warnings, no? |
There are likely warnings produced for all dependencies (includeing Boost and libevent),
Where a number of the above continue to change over time.
This isn't the case, for example, for someone compiling on macOS, with only sqlite. They'll see warnings for both Boost and libevent. Someone cross-compiling for riscv64 on Ubuntu will see warnings from Boost (Test) etc. |
I get a large number of warnings from boost. |
322b64e
to
925f170
Compare
Concept ACK. #22041 :) |
I think this comment by @Sjors:
is still relevant. Maybe its "should be better documented" part is worth being added to this PR? |
How? Where? |
Developer Notes? Maybe in the "Development tips and tricks" section? cc @Sjors |
Did this recently annoy you, or were there users opening issues / having trouble parsing through the warnings? |
Concept ACK I don't ever run configure without this flag, so having it out of mind is a win for me. |
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.
Concept ACK. The large amount of warnings produced without this flag generally makes me not look at any warning when I forgot to set the flag. Agreed that we do need to be vigilant for upstream warnings, but I don't think disabling the suppression by default really helps with that.
On Ubuntu 22.04: $ ./autogen.sh && ./configure CC=clang CXX=clang++
$ make 2> >(wc -l >&2) > /dev/null
168634 It does not annoy me at all :) It just makes spotting of warnings I am interesting in a bit harder. |
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.
ACK 925f170
$ git grep -l "enable-suppress-external-warnings"
doc/developer-notes.md
Drop it as well?
I think it's correct as-is? |
Yes. Technically, it is correct. But it seems confusing to me as the line "The output is denoised of errors from external dependencies and includes with |
925f170
to
3b2acfc
Compare
Ok. Just deleted all that. |
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.
ACK 3b2acfc
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.
ACK 3b2acfc
ACK 3b2acfc |
Should no-longer be needed post bitcoin#27872. If it is, then suppress-external-warnings should be fixed.
3210f22 refactor: remove in-code warning suppression (fanquake) Pull request description: Should no-longer be needed post #27872. If it is, then suppress-external-warnings should be fixed. ACKs for top commit: hebasto: ACK 3210f22 Tree-SHA512: 2405250b7308779d576f13ce9144944abd5b2293499a0c0fe940398dae951cb871246a55c0e644a038ee238f9510b5845c3e39f9658d9f10225a076d8122f078
3210f22 refactor: remove in-code warning suppression (fanquake) Pull request description: Should no-longer be needed post bitcoin#27872. If it is, then suppress-external-warnings should be fixed. ACKs for top commit: hebasto: ACK 3210f22 Tree-SHA512: 2405250b7308779d576f13ce9144944abd5b2293499a0c0fe940398dae951cb871246a55c0e644a038ee238f9510b5845c3e39f9658d9f10225a076d8122f078
I think we are at the point where it make more sense to make this the default, than not. It's already used in the CI, and I assume most building locally are also utilising it.