Skip to content

Conversation

fanquake
Copy link
Member

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.

@DrahtBot
Copy link
Contributor

DrahtBot commented Jun 13, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK hebasto, stickies-v, achow101
Concept ACK TheCharlatan

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

@maflcko
Copy link
Member

maflcko commented Jun 13, 2023

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.

@fanquake
Copy link
Member Author

I think there is still a benefit to developers being notified about warnings in headers.

They can still be notified, by disabling the suppression.

Otherwise no one may notice the false warnings and report them upstream.

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 -Werror (which is also why some devs would always be suppressing locally).

@maflcko
Copy link
Member

maflcko commented Jun 13, 2023

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?

@fanquake
Copy link
Member Author

IIRC this is only needed for bdb4 and qt5,

There are likely warnings produced for all dependencies (includeing Boost and libevent),
because warning output is dependant on:

  • architecture
  • operating system (& version)
  • compiler (& version)
  • compiler flags being used
  • other compile options i.e LTO
  • packages being used (& version) (& system vs depends)

Where a number of the above continue to change over time.

so someone compiling bitcoind with sqlite shouldn't have to suppress warnings, no?

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.

@achow101
Copy link
Member

so someone compiling bitcoind with sqlite shouldn't have to suppress warnings, no?

I get a large number of warnings from boost.

@fanquake fanquake force-pushed the make_suppress_external_default branch from 322b64e to 925f170 Compare June 13, 2023 15:29
@hebasto
Copy link
Member

hebasto commented Jun 14, 2023

Concept ACK. #22041 :)

@hebasto
Copy link
Member

hebasto commented Jun 14, 2023

I think this comment by @Sjors:

I don't think we should make --enable-suppress-external-warnings the default, but it should be better documented. Someone needs to be motivated to fix things upstream and/or notice problems when we update dependencies.

is still relevant. Maybe its "should be better documented" part is worth being added to this PR?

@fanquake
Copy link
Member Author

"should be better documented"

How? Where?

@hebasto
Copy link
Member

hebasto commented Jun 14, 2023

"should be better documented"

How? Where?

Developer Notes? Maybe in the "Development tips and tricks" section?

cc @Sjors

@TheCharlatan
Copy link
Contributor

Did this recently annoy you, or were there users opening issues / having trouble parsing through the warnings?

@TheCharlatan
Copy link
Contributor

Concept ACK

I don't ever run configure without this flag, so having it out of mind is a win for me.

Copy link
Contributor

@stickies-v stickies-v left a 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.

@hebasto
Copy link
Member

hebasto commented Jun 14, 2023

Did this recently annoy you, or were there users opening issues / having trouble parsing through the warnings?

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.

Copy link
Member

@hebasto hebasto left a 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?

@fanquake
Copy link
Member Author

Drop it as well?

I think it's correct as-is?

@hebasto
Copy link
Member

hebasto commented Jun 15, 2023

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 --enable-suppress-external-warnings and --config src/.bear-tidy-config. Both options may be omitted to view the full list of errors." explains the options used the followed code snippet. And the --enable-suppress-external-warnings option is not used in there anymore.

@fanquake fanquake force-pushed the make_suppress_external_default branch from 925f170 to 3b2acfc Compare June 15, 2023 13:12
@fanquake
Copy link
Member Author

Ok. Just deleted all that.

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 3b2acfc

Copy link
Contributor

@stickies-v stickies-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 3b2acfc

@achow101
Copy link
Member

ACK 3b2acfc

@achow101 achow101 merged commit 9372ec7 into bitcoin:master Jun 15, 2023
@fanquake fanquake deleted the make_suppress_external_default branch June 15, 2023 14:21
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jun 15, 2023
fanquake added a commit to fanquake/bitcoin that referenced this pull request Jun 29, 2023
Should no-longer be needed post bitcoin#27872. If it is, then
suppress-external-warnings should be fixed.
fanquake added a commit that referenced this pull request Jun 30, 2023
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
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jun 30, 2023
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
@bitcoin bitcoin locked and limited conversation to collaborators Jun 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants