Skip to content

refactor(meson): drop cleanup_stale_meson_lockfile() — meson floor is >=1.11.0 (#3129 A1) - #3140

Merged
zackees merged 2 commits into
masterfrom
refactor/3129-a1-drop-stale-lockfile-cleanup
Jun 16, 2026
Merged

zackees merged 2 commits into
masterfrom
refactor/3129-a1-drop-stale-lockfile-cleanup

Conversation

@zackees

@zackees zackees commented Jun 16, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Removes the dead cleanup_stale_meson_lockfile() helper and its 4 call sites.
  • The function existed to work around a Windows DirectoryLock crash in meson <=1.10.x that the upstream fix (1.11.0) already addresses. The helper's own docstring states: "meson 1.11.0 fixed the crash itself".
  • pyproject.toml pins meson>=1.11.0, so the workaround is dead code on every supported configuration.

Why now

Part of meta issue #3129 (Section A1) — the build-system rebuild-workarounds audit. A1 is the smallest "drop the lockfile workaround" fix-now item.

What changes

File Change
ci/meson/meson_markers.py Drop cleanup_stale_meson_lockfile() function + unused import os
ci/meson/meson_setup_execute.py Drop import + 2 call sites
ci/meson/build_config.py Drop import + remove from __all__ re-export list
ci/wasm_build.py Drop _cleanup_stale_meson_lockfile wrapper + 3 call sites

4 files changed, 63 deletions(-) — pure dead-code removal, zero behavioral additions.

Validation

The change cannot affect C++ build or link behavior — it only removes Python orchestration code that ran before meson setup to delete a stale lockfile that meson 1.11.0 no longer chokes on.

Test plan

  • CI passes on this branch
  • Quick bash test --cpp on master after merge (confirm no regression in the setup path)
  • Eyeball bash test startup time on Windows pre/post (audit estimated 50–150 ms saved)

Part of #3129 (Section A1).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Removed automatic stale Meson lockfile cleanup from CI and build automation, including Meson marker/setup/reconfigure flows and the WebAssembly build recovery paths. Windows-specific lockfile deletion handling was also removed. This simplifies the Meson setup orchestration while leaving the core build and Ninja maintenance behavior unchanged.

@coderabbitai

coderabbitai Bot commented Jun 16, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 211da32a-33e8-4a88-aa93-cd74966e254d

📥 Commits

Reviewing files that changed from the base of the PR and between b845126 and c8e77f2.

📒 Files selected for processing (1)
  • ci/meson/meson_markers.py

📝 Walkthrough

Walkthrough

Removes the cleanup_stale_meson_lockfile Windows workaround entirely: the function definition and module docstring reference in ci/meson/meson_markers.py are deleted, all imports and __all__ re-exports are removed from ci/meson/build_config.py and ci/meson/meson_setup_execute.py, and all call sites are eliminated from ci/meson/meson_setup_execute.py and ci/wasm_build.py.

Changes

Stale Meson lockfile cleanup removal

Layer / File(s) Summary
Function definition and docstring deletion
ci/meson/meson_markers.py
Removes the cleanup_stale_meson_lockfile(build_dir: Path) function and shortens the module docstring to drop the Windows DirectoryLock cleanup statement.
Import and export cleanup
ci/meson/build_config.py, ci/meson/meson_setup_execute.py
Removes the import of cleanup_stale_meson_lockfile from meson_setup_execute.py, and removes both the import and __all__ re-export from build_config.py.
Call site removal across CI and build paths
ci/meson/meson_setup_execute.py, ci/wasm_build.py
Removes all invocations from the initial setup path, retry path, self-healing reconfigure recovery flow, reconfigure branch, and the private _cleanup_stale_meson_lockfile helper in the wasm build script.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Possibly related PRs

  • FastLED/FastLED#2486: This PR removes the stale Meson lockfile cleanup helper and its call sites, directly reverting the logic that was added in PR #2486.

Poem

🐇 Hop hop, the lockfile's gone,
No more sweeping stale locks on Windows morn,
The meson runs clean, no ghost to fear—
The DirectoryLock bug? No longer here!
With one version bump, the workaround's done,
Fewer lines of code, more CI fun! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: removing the cleanup_stale_meson_lockfile() function due to meson>=1.11.0 requirement.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/3129-a1-drop-stale-lockfile-cleanup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Removes the helper and its 4 call sites. The function existed to work around
a Windows DirectoryLock crash in meson <=1.10.x that the upstream fix (1.11.0)
already addresses. The helper's own docstring acknowledges:
"meson 1.11.0 fixed the crash itself".

pyproject.toml pins meson>=1.11.0, so the workaround is dead code on every
supported configuration. Removing it saves a per-build os.name check + Path
existence test on Windows on every bash test startup (~50-150 ms).

Files touched:
- ci/meson/meson_markers.py: drop function, drop unused import os
- ci/meson/meson_setup_execute.py: drop import + 2 call sites
- ci/meson/build_config.py: drop import + __all__ re-export
- ci/wasm_build.py: drop _cleanup_stale_meson_lockfile wrapper + 3 call sites

Part of #3129 (Section A1).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@zackees
zackees force-pushed the refactor/3129-a1-drop-stale-lockfile-cleanup branch from c261683 to b845126 Compare June 16, 2026 09:29

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ci/meson/meson_markers.py`:
- Around line 299-301: The code at the conditional check using os.name on line
300 requires the os module to be imported, but there is no import os statement
in the file. Add import os to the imports section at the top of
ci/meson/meson_markers.py to resolve the NameError that will occur when this
code executes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3aeef93f-4261-4d83-990a-fa6c639adccf

📥 Commits

Reviewing files that changed from the base of the PR and between c261683 and b845126.

📒 Files selected for processing (4)
  • ci/meson/build_config.py
  • ci/meson/meson_markers.py
  • ci/meson/meson_setup_execute.py
  • ci/wasm_build.py
💤 Files with no reviewable changes (3)
  • ci/meson/meson_setup_execute.py
  • ci/wasm_build.py
  • ci/meson/build_config.py

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ci/meson/meson_markers.py`:
- Around line 299-301: The code at the conditional check using os.name on line
300 requires the os module to be imported, but there is no import os statement
in the file. Add import os to the imports section at the top of
ci/meson/meson_markers.py to resolve the NameError that will occur when this
code executes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3aeef93f-4261-4d83-990a-fa6c639adccf

📥 Commits

Reviewing files that changed from the base of the PR and between c261683 and b845126.

📒 Files selected for processing (4)
  • ci/meson/build_config.py
  • ci/meson/meson_markers.py
  • ci/meson/meson_setup_execute.py
  • ci/wasm_build.py
💤 Files with no reviewable changes (3)
  • ci/meson/meson_setup_execute.py
  • ci/wasm_build.py
  • ci/meson/build_config.py
🛑 Comments failed to post (1)
ci/meson/meson_markers.py (1)

299-301: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

os is used but not imported — this will raise NameError at runtime.

Line 300 references os.name but there is no import os statement in this file. The PR description mentions removing an "unused import os statement," but this new platform-specific logic actually requires it.

🐛 Proposed fix: Add the missing import
 import sys
+import os
 from pathlib import Path
 from typing import Optional
🧰 Tools
🪛 Ruff (0.15.17)

[error] 300-300: Undefined name os

(F821)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ci/meson/meson_markers.py` around lines 299 - 301, The code at the
conditional check using os.name on line 300 requires the os module to be
imported, but there is no import os statement in the file. Add import os to the
imports section at the top of ci/meson/meson_markers.py to resolve the NameError
that will occur when this code executes.

Source: Linters/SAST tools

…wrapping

The A1 rebase pulled in a new master commit that uses os.name in
inject_zccache_wrapping() to select Windows vs. POSIX target rules.
My A1 removal of import os (along with the lockfile helper) was correct
on the original A1 base but conflicts with the new master code on rebase.

Restoring import os resolves "NameError: name 'os' is not defined" raised
during setup on every CI runner.

Part of #3129 (Section A1) — fixup for rebase regression.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@zackees
zackees merged commit 8e9c7fe into master Jun 16, 2026
10 checks passed
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jun 16, 2026
@zackees
zackees deleted the refactor/3129-a1-drop-stale-lockfile-cleanup branch August 21, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant