Skip to content

build: bump meson floor to >=1.11.0 (fixes Windows DirectoryLock crash) - #2483

Merged
zackees merged 1 commit into
masterfrom
bump-meson-floor-1110-issue-2482
May 18, 2026
Merged

zackees merged 1 commit into
masterfrom
bump-meson-floor-1110-issue-2482

Conversation

@zackees

@zackees zackees commented May 18, 2026 •

Copy link
Copy Markdown
Member

Summary

Bumps the meson floor in pyproject.toml from >=1.10.0 to >=1.11.0.

meson 1.9.x and 1.10.x have a Windows-only bug in DirectoryLock.__enter__ where a missing raise in the except OSError block causes a cryptic AttributeError: 'NoneType' object has no attribute 'fileno' crash instead of surfacing the real underlying OSError. This blocks the WASM build pipeline on Windows.

Upstream fix landed in mesonbuild/meson@fb6db407 ("utils: make .wraplock optional", 2025-08-26), first released in meson 1.11.0.

meson version DirectoryLock OSError handler
1.9.x buggy
1.10.x buggy
1.11.0+ fixed

Closes #2482

Test plan

  • pip install fastled (or pip install meson) now pulls meson >=1.11.0
  • On Windows, when an underlying lockfile OSError occurs, the real error is surfaced instead of the misleading NoneType AttributeError

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated build system dependency version to maintain compatibility.

Review Change Stack

meson 1.9.x and 1.10.x have a Windows-only bug in DirectoryLock.__enter__
where a missing raise in the OSError handler causes a cryptic
AttributeError: 'NoneType' object has no attribute 'fileno' crash
instead of surfacing the real underlying OSError. This blocks the WASM
build pipeline on Windows.

Upstream fix landed in mesonbuild/meson@fb6db407 (utils: make .wraplock
optional, 2025-08-26), first released in meson 1.11.0.

Closes #2482

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented May 18, 2026 •

Copy link
Copy Markdown

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: b7a37f71-217e-45e3-b8c7-3eef4734e410

📥 Commits

Reviewing files that changed from the base of the PR and between 6657bbf and 5ad6b5c.

📒 Files selected for processing (1)
  • pyproject.toml

📝 Walkthrough

Walkthrough

The meson build tool dependency floor in pyproject.toml is bumped from version 1.10.0 to 1.11.0, ensuring installations pull a release that fixes a Windows-specific crash in DirectoryLock exception handling.

Changes

Meson version constraint update

Layer / File(s) Summary
Meson minimum version constraint
pyproject.toml
Meson dependency updated from >=1.10.0 to >=1.11.0 to include the upstream fix for Windows DirectoryLock NoneType crash when file locking conflicts occur during build setup.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A rabbit hops through Windows snow,
The lock was broken, moving slow.
One version bump, the bug now gone—
Meson's fixed, we march on! 🎉
No more NoneType in the way,
The WASM build wins the day!

🚥 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 directly describes the main change (bumping meson floor to 1.11.0) and includes the key benefit (fixes Windows DirectoryLock crash), aligning with the actual code modification in pyproject.toml.
Linked Issues check ✅ Passed The pull request fully satisfies issue #2482 by updating the meson dependency from >=1.10.0 to >=1.11.0, which incorporates the upstream fix (mesonbuild/meson@fb6db407) for the DirectoryLock.enter bug.
Out of Scope Changes check ✅ Passed The pull request contains only the intended change: updating the meson dependency version constraint in pyproject.toml, with no additional out-of-scope modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bump-meson-floor-1110-issue-2482

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.

@zackees
zackees merged commit 1c5f873 into master May 18, 2026
3 of 4 checks passed
@zackees
zackees deleted the bump-meson-floor-1110-issue-2482 branch May 18, 2026 21:21
zackees added a commit that referenced this pull request May 18, 2026
* fix(build): clean stale meson lockfile before setup

On Windows, meson <= 1.10.x crashed cryptically in
DirectoryLock.__enter__ when the underlying lockfile open() raised
an OSError (e.g., from a stale lockfile left by a killed or abandoned
meson process). meson 1.11.0 (PR #2483) fixed the crash itself, but
the underlying cause -- a stale meson-private/meson.lock file --
still produces an avoidable setup failure on Windows.

This patch adds a small helper cleanup_stale_meson_lockfile() that
removes the stale lockfile before invoking meson setup, eliminating
the failure entirely. The helper is tolerant of file-in-use errors:
on failure it logs and continues so the caller still sees the
underlying meson error (now visible thanks to the 1.11.0 bump).

Call sites:
  - ci/meson/build_config.py: setup_meson_build() -- before main
    meson setup invocation (and before the cache-clear retry).
  - ci/wasm_build.py: ensure_meson_configured() -- before the
    initial setup and the reconfigure paths.
  - ci/wasm_build.py: _recover_stale_wasm_build() -- before the
    self-healing reconfigure attempt.

Closes #2484.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* fix(build): address CodeRabbit feedback on lockfile cleanup

Apply two corrections to cleanup_stale_lockfile() per CodeRabbit
review on PR #2486 (thread 3262492253):

- Add Windows-only platform guard via os.name != "nt". The stale
  lockfile cleanup is only needed for the Windows DirectoryLock bug.
  On POSIX, the build system uses fcntl/flock (advisory), so removing
  an in-use lockfile could let a concurrent setup bypass the lock.
- Add explicit KeyboardInterrupt handling before the OSError handler,
  routed through handle_keyboard_interrupt() per project convention.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bump meson floor to >=1.11.0 (fixes DirectoryLock NoneType crash on Windows)

1 participant