Skip to content

Rebuild stale self-hosted compiler drivers - #638

Merged
godofecht merged 1 commit into
mainfrom
fix-ensure-flowc-staleness
Aug 21, 2026
Merged

godofecht merged 1 commit into
mainfrom
fix-ensure-flowc-staleness

Conversation

@godofecht

Copy link
Copy Markdown
Contributor

Closes #633.

compiler/scripts/ensure_flowc.sh previously reused the first executable Stage-A driver it found, even when files under compiler/src/ were newer. That made compiler-source edits silently disappear under FLOW_HOST=flowc.

This change rejects drivers older than any compiler source and also refuses the Python-free bootstrap-C path when the checked-in generated C is itself older than compiler/src/; otherwise a newly compiled binary could still encode stale compiler sources.

Regression coverage exercises both sides of the freshness rule: a stale driver must trigger the roundtrip rebuild, while a fresh driver is reused without bootstrapping.

@godofecht
godofecht force-pushed the fix-ensure-flowc-staleness branch from 08a9842 to 1f63bcd Compare August 21, 2026 12:59
Reject cached Stage-A drivers older than compiler/src and avoid rebuilding from a checked-in bootstrap C file that is itself stale. Add regression coverage for stale and fresh driver selection.

Closes #633.
@godofecht
godofecht force-pushed the fix-ensure-flowc-staleness branch from 1f63bcd to 7b5d474 Compare August 21, 2026 13:06
@godofecht
godofecht marked this pull request as ready for review August 21, 2026 15:25
@godofecht
godofecht merged commit 9cb565a into main Aug 21, 2026
20 checks passed
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.

ensure_flowc.sh reuses a stale driver, so cgen.flow changes silently do not take effect

1 participant