Repository navigation
Conversation
This PR bumps the `.olean` header version (to 4 for the plain format and 5 for the closures format) because #16107 changed the `Expr` hash function, whose results are stored in `.olean` files. External tools such as `leantar` reconstruct these hashes and key their behavior on the header version (see digama0/leangz#20). The reader still accepts versions 2 and 3, which the current stage0 compiler writes; that can be dropped after the next stage0 update. 🤖 Built with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This merges the plain and the closures-capable `.olean` formats into a single format with header version 4, which `CompactedRegion.save` writes regardless of `allowClosures`; that flag now only decides whether a closure is an error. A file without closures differs from the old plain format by a `data_size` slot before the data and an 8-byte trailer of zeros, so tools such as `leantar` can read it with little effort. The trailer is now reserved in the compactor buffer in one call. `alloc` rounds up to 8 bytes, so the separate reservations would have reserved 16 bytes for 8 bytes of file content, and part base addresses could have disagreed with the addresses derived from file lengths. The reader still accepts version 2, which the current stage0 compiler writes; that can be dropped after the next stage0 update. 🤖 Built with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nomeata
marked this pull request as ready for review
November 5, 2026 18:01
This removes reading of version 2 `.olean` files. Stage1's library is written by the stage0 compiler in version 2, so stage1 can no longer load it; the stage0 `stdlib_flags.h` box is ticked so CI builds and tests stage2 instead, and `update-stage0` runs on merge. 🤖 Built with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nomeata
marked this pull request as draft
November 6, 2026 11:19
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR bumps the
.oleanheader version to 4 and merges the plain and the closures-capable formats into one, because #16107 changed theExprhash function, whose results are stored in.oleanfiles. External tools such asleantarreconstruct these hashes and key their behavior on the header version (see digama0/leangz#20).CompactedRegion.savenow always writes the same format, andallowClosuresonly decides whether a closure is an error. A file without closures is laid out as[header][data_size][root][objects][8 zero bytes], wheredata_sizecovers the root and the objects.Since stage0 still writes version 2, this PR is tested with stage2 and updates stage0 on merge.
This needs a leantar release that accepts version 4 and a corresponding bump of
LEANTAR_VERSIONinCMakeLists.txt.🤖 Generated with Claude Code