Skip to content

Make message generation idempotent#22

Merged
tcappellari-bdai merged 1 commit into
mainfrom
fix-ninja-reconfig-loop
Jul 21, 2026
Merged

Make message generation idempotent#22
tcappellari-bdai merged 1 commit into
mainfrom
fix-ninja-reconfig-loop

Conversation

@taughz

@taughz taughz commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

This is necessary to prevent an endless reconfigure loop when using Ninja. Because generated messages are both build outputs and configure dependencies, generating them would trigger a reconfigure, which would then generate the messages, and so on, ad infinitum.

Proposed changes

  • Do not modify message files if the contents are unchanged.
  • Do not unconditionally delete messages during generation.

Checklist

  • Lint and unit tests pass locally
  • I have added tests that prove my changes are effective
  • I have added necessary documentation to communicate the changes

Additional comments

Fixes #21.

This is necessary to prevent an endless reconfigure loop when using
Ninja. Because generated messages are both build outputs and configure
dependencies, generating them would trigger a reconfigure, which would
then generate the messages, and so on, ad infinitum.

Fixes #21.
@taughz taughz self-assigned this Jul 21, 2026
@taughz
taughz requested a review from jbarry-bdai as a code owner July 21, 2026 02:45
@taughz
taughz requested review from mhidalgo-rai and tcappellari-bdai and removed request for jbarry-bdai July 21, 2026 02:45

@mhidalgo-rai mhidalgo-rai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@tcappellari-bdai
tcappellari-bdai merged commit 919de0f into main Jul 21, 2026
5 checks passed
@tcappellari-bdai
tcappellari-bdai deleted the fix-ninja-reconfig-loop branch July 21, 2026 14:02
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.

Building with Ninja seems to cause an inifinite configure loop

3 participants