fix(lint): annotate Python daemon Command::new sites#317
Conversation
…pawn lint After f86817a (refactor lib.rs → submodules) the four std::process::Command::new sites in fbuild-python/daemon.rs ended up inside `match` arms two lines below their `allow-direct-spawn:` comment. The detector in ci/find_direct_subprocess.py only looks at "same line or the line immediately above", so the annotation no longer covered the actual call sites and CI started reporting: NEW direct spawns without an `allow-direct-spawn: <reason>` marker: crates/fbuild-python/src/daemon.rs:96 crates/fbuild-python/src/daemon.rs:97 crates/fbuild-python/src/daemon.rs:247 crates/fbuild-python/src/daemon.rs:248 This blocks every PR's "Lint subprocess spawns" check (e.g. #306 for fbuild#304, which is the actual FastLED-vs-PIO size regression we need to land). Fix: add an inline `// allow-direct-spawn:` annotation immediately above each of the four arms. Behavior unchanged.
|
Warning Review limit reached
More reviews will be available in 38 minutes and 39 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 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 |
Bundles four user-facing fixes merged since 2.2.9: - #319, #320: SAMD51 cores/arduino fallback + variant include injection (Build SAMD51J was 100% red) - #321, #322: nRF52 nRF52DK -> pca10056 variant alias for Adafruit framework (Build nRF52840 DK was 100% red) - #298 (already shipped 2.2.9, board JSON drift cleanup): #318 catches up the tinyuf2 partition renames + adds cmsis_dsp_lib validator whitelist (Validate Boards was failing on 39 boards, now 14) - #317: daemon.rs Command::new annotations (Lint subprocess spawns was red — blocked every PR) Downstream FastLED bumps fbuild==2.2.9 to fbuild==2.2.10 to pick up these fixes.
…de paths per compile (#2617) ## fbuild pin: 2.2.9 -> 2.2.11 2.2.11 republishes 2.2.10's content with the full wheel set (win_amd64 + manylinux_x86_64 were missing from 2.2.10's PyPI upload — that release was effectively unusable on Windows and Linux x64). Content otherwise identical to 2.2.10. Brings in: - SAMD51 cores/arduino fallback + include-path injection (FastLED/fbuild#319/#320). Build SAMD51J was 100% red. - nRF52 nRF52DK -> pca10056 variant alias for the Adafruit framework (FastLED/fbuild#321/#322). Build nRF52840 DK was 100% red. - Board JSON tinyuf2 partition rename (18 Adafruit boards) + 4d_systems esp_sr_16.csv -> default_16MB.csv + cmsis_dsp_lib validator whitelist (FastLED/fbuild#318). Validate Boards drift drops 39 -> 14. - daemon.rs Command::new subprocess-spawn lint annotations (FastLED/fbuild#317). Unblocked every PR's Lint subprocess spawns check. ## ci/meson/compile.py: re-normalize strict-path includes before each build zccache strict-paths rejects relative + backslash include flags. The build_config helper normalizes once at setup, but ninja silently regenerates build.ninja when build files change, which re-introduces the relative form (e.g. -Ici/.../fastled.dll.p with a backslash). The next compile then dies with zccache --strict-paths violation. Fix: call normalize_meson_private_include_paths(build_dir) at the top of compile_meson, right after the stale-PCH check. Costs ~5-20 ms and is idempotent when nothing changed. KBI001-compliant (KeyboardInterrupt handler calls handle_keyboard_interrupt(ki) before re-raise; module already imports it at line 25).
Summary
After commit
f86817a9(refactorlib.rs-> submodules) the fourstd::process::Command::newsites incrates/fbuild-python/src/daemon.rsended up insidematcharms two lines below their// allow-direct-spawn:comment. The detector inci/find_direct_subprocess.pyonly checks "same line or the line immediately above", so the annotation no longer covered the actual call sites and CI started reporting:This blocks every PR's
Lint subprocess spawnscheck — including #306 (the actual FastLED-vs-PIO size regression for fbuild#304).Fix
Add an inline
// allow-direct-spawn: daemon must outlive the Python interpreter.annotation immediately above each of the fourmatch-armCommand::newcalls. Behavior unchanged.Verification
Down from
to migrate: 4on main. Once this lands, PR #306'sLint subprocess spawnsshould turn green.