fix: make -DLEAN_VERSION_* CMake overrides actually work#13226
Merged
Conversation
The version variables (LEAN_VERSION_MAJOR, MINOR, PATCH, IS_RELEASE) were declared with plain `set()`, which creates normal variables that shadow cache variables set by `-D` flags on the command line. This made the `-DLEAN_VERSION_*` flags passed by CI (and forwarded to stage0 via STAGE0_ARGS) completely ineffective — the `set()` always won. Change them to `set(... CACHE STRING "")` to match the existing pattern used by LEAN_SPECIAL_VERSION_DESC. With CACHE STRING (no FORCE), the value in CMakeLists.txt is the default, but `-D` flags take precedence. Also update release_checklist.py parsing to handle the new format. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The `sed` regex for LEAN_VERSION_IS_RELEASE expected the line to end with `)` immediately after the number, but the line now has `CACHE STRING ""` after the value. Use `grep -oE` consistent with the other version extractions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
e9bfa98 to
5726bd7
Compare
volodeyka
pushed a commit
that referenced
this pull request
Apr 16, 2026
This PR updates `release_checklist.py` to handle the `CACHE STRING ""` suffix on CMake version variables. The `CACHE STRING` format was introduced in the `releases/v4.30.0` branch, but the script's parsing wasn't updated to match, causing false failures. 🤖 Prepared with Claude Code --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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 updates
release_checklist.pyto handle theCACHE STRING ""suffix on CMake version variables. TheCACHE STRINGformat was introduced in thereleases/v4.30.0branch, but the script's parsing wasn't updated to match, causing false failures.🤖 Prepared with Claude Code