Skip to content

fix: make -DLEAN_VERSION_* CMake overrides actually work#13226

Merged
kim-em merged 2 commits into
masterfrom
kimmo/fix-release-checklist-cache-string
Apr 1, 2026
Merged

fix: make -DLEAN_VERSION_* CMake overrides actually work#13226
kim-em merged 2 commits into
masterfrom
kimmo/fix-release-checklist-cache-string

Conversation

@kim-em
Copy link
Copy Markdown
Collaborator

@kim-em kim-em commented Apr 1, 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

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>
@kim-em kim-em force-pushed the kimmo/fix-release-checklist-cache-string branch from e9bfa98 to 5726bd7 Compare April 1, 2026 05:20
@kim-em kim-em added this pull request to the merge queue Apr 1, 2026
Merged via the queue into master with commit fc0cf68 Apr 1, 2026
18 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant