Repository navigation
refactor(meson): drop cleanup_stale_meson_lockfile() — meson floor is >=1.11.0 (#3129 A1) - #3140
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughRemoves the ChangesStale Meson lockfile cleanup removal
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
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]>
c261683 to
b845126
Compare
There was a problem hiding this comment.
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
📒 Files selected for processing (4)
ci/meson/build_config.pyci/meson/meson_markers.pyci/meson/meson_setup_execute.pyci/wasm_build.py
💤 Files with no reviewable changes (3)
- ci/meson/meson_setup_execute.py
- ci/wasm_build.py
- ci/meson/build_config.py
There was a problem hiding this comment.
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
📒 Files selected for processing (4)
ci/meson/build_config.pyci/meson/meson_markers.pyci/meson/meson_setup_execute.pyci/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
osis used but not imported — this will raiseNameErrorat runtime.Line 300 references
os.namebut there is noimport osstatement in this file. The PR description mentions removing an "unusedimport osstatement," 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]>
Summary
cleanup_stale_meson_lockfile()helper and its 4 call sites.DirectoryLockcrash in meson<=1.10.xthat the upstream fix (1.11.0) already addresses. The helper's own docstring states: "meson 1.11.0 fixed the crash itself".pyproject.tomlpinsmeson>=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
ci/meson/meson_markers.pycleanup_stale_meson_lockfile()function + unusedimport osci/meson/meson_setup_execute.pyci/meson/build_config.py__all__re-export listci/wasm_build.py_cleanup_stale_meson_lockfilewrapper + 3 call sites4 files changed, 63 deletions(-) — pure dead-code removal, zero behavioral additions.
Validation
bash lintcleangrep cleanup_stale_meson_lockfilereturns zero hits across the treebash test --cppblocked by a known zccache daemon flake (zccache[err][R]: lost connection to daemon) — this is the exact bug documented in [meta] Build-system rebuild workarounds — fix-now list + zccache/meson upstream blockers #3129 Section C6 and is unrelated to the change. CI will be the source of truth.The change cannot affect C++ build or link behavior — it only removes Python orchestration code that ran before
meson setupto delete a stale lockfile that meson 1.11.0 no longer chokes on.Test plan
bash test --cppon master after merge (confirm no regression in the setup path)bash teststartup time on Windows pre/post (audit estimated 50–150 ms saved)Part of #3129 (Section A1).
🤖 Generated with Claude Code
Summary by CodeRabbit