Skip to content

Conversation

theuni
Copy link
Member

@theuni theuni commented Mar 2, 2023

ping hebasto

Discovered while testing pre-compiled header support with CMake: https://github.com/theuni/bitcoin/commits/cmake-pch-poc. Compilation of that branch fails without this fix and succeeds with it.

Similar to the fix in #27144.

The problem of having a default argument in the definition was masked by the missing include. Using PCH forces that include, so we end up with the compiler error we should've been getting all along.

@DrahtBot
Copy link
Contributor

DrahtBot commented Mar 2, 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 fanquake
Stale ACK TheCharlatan

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

Copy link
Contributor

@TheCharlatan TheCharlatan left a comment

Choose a reason for hiding this comment

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

ACK 101601a

Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

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

lgtm

@@ -4,14 +4,15 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <fs.h>
#include <util/readwritefile.h>
Copy link
Member

Choose a reason for hiding this comment

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

nit: Including the own module goes on the first line/section, usually, to catch missing includes in the header file.

Also, could add it to iwyu in ci/test/06_...sh, so that reviewers can look at the ci output if they want?

Copy link
Member Author

Choose a reason for hiding this comment

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

Reordered. I think this change is simple enough for manual review :)

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I was mostly thinking that it would be good to check for other missing includes while touching the file, so that it doesn't have to be touched again later if there is a missing stdlib include or so.

@theuni theuni force-pushed the fix-readbinaryfile branch from 101601a to 8847ce4 Compare March 3, 2023 22:19
Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

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

ACK 8847ce4

@DrahtBot DrahtBot requested a review from TheCharlatan March 4, 2023 07:15
@fanquake fanquake merged commit 40c6c85 into bitcoin:master Mar 4, 2023
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Mar 4, 2023
…ture

8847ce4 util: add missing include and fix function signature (Cory Fields)

Pull request description:

  ping hebasto

  Discovered while testing pre-compiled header support with CMake: https://github.com/theuni/bitcoin/commits/cmake-pch-poc. Compilation of that branch fails without this fix and succeeds with it.

  Similar to the fix in bitcoin#27144.

  The problem of having a default argument in the definition was masked by the missing include. Using PCH forces that include, so we end up with the compiler error we should've been getting all along.

ACKs for top commit:
  fanquake:
    ACK 8847ce4

Tree-SHA512: 5eb9a6691ee37cbc5033a48aedcbf5c93af3b234614ae14c3fcc858f1ee505f630ad68f8bbb69ffa280080c8d0f91451362cb3819290b741ce906b2b3224a622
@hebasto
Copy link
Member

hebasto commented Mar 6, 2023

Post-merge ACK.

@bitcoin bitcoin locked and limited conversation to collaborators Mar 5, 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.

6 participants