cmake: Fix stale codegen when mpgen binary changes #316

pull ViniciusCestarii wants to merge 1 commits into bitcoin-core:master from ViniciusCestarii:prevent-stale-codegen changing 1 files +1 −1
  1. ViniciusCestarii commented at 3:01 PM on July 22, 2026: contributor

    Add MPGEN_BINARY to DEPENDS so target_capnp_sources() also rebuilds when mpgen binary changes. This prevents stale code gen when mpgen binary changes but capnp files don't.

    I noticed this after seeing IWYU errors while building the examples, which were caused by stale generated code that no longer matched what the current mpgen produces.

  2. cmake: Fix stale codegen when mpgen binary changes eea9c64f6e
  3. DrahtBot commented at 3:01 PM on July 22, 2026: none

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    ACK hebasto, xyzconstant, ryanofsky

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. hebasto approved
  5. hebasto commented at 3:23 PM on July 22, 2026: member

    ACK eea9c64f6e1682f7ad7c4a0e7ffbcc8c61619b21.

    From CMake docs:

    List target names with the DEPENDS option to add ... file-level dependencies.

  6. xyzconstant commented at 3:34 PM on July 22, 2026: contributor

    ACK eea9c64f6e1682f7ad7c4a0e7ffbcc8c61619b21

    I noticed this after seeing IWYU errors while building the examples, which was caused by stale generated code that no longer matched what the current mpgen produces.

    Nice catch! I experienced this too, but I ignored it thinking there was something wrong with my machine.

  7. ryanofsky approved
  8. ryanofsky commented at 1:54 PM on July 30, 2026: collaborator

    Code review ACK eea9c64f6e1682f7ad7c4a0e7ffbcc8c61619b21. Nice fix which should make testing generator changes more convenient.

  9. ryanofsky merged this on Jul 30, 2026
  10. ryanofsky closed this on Jul 30, 2026


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/libmultiprocess. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-08-05 20:30 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me