Repository navigation
Require fbuild Teensy toolchain fix - #2375
Conversation
📝 WalkthroughWalkthroughThis PR adds a new test module that validates fbuild board configuration and ensures the fbuild dependency is pinned to version 2.2.1 or higher. The tests verify specific Teensy board inclusions and dependency constraints, while the dependency update captures a toolchain fix for Teensy 4.x board routing. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
ci/tests/test_fbuild_boards.py (2)
19-23: Check the minimum version semantically, not by exact string.Line 23 only accepts exactly
fbuild>=2.2.1; it will fail for valid future constraints that still include the fix, such asfbuild>=2.2.2orfbuild>=2.2.1,<3.♻️ Proposed test-side guard
def test_fbuild_dependency_requires_teensy_toolchain_fix() -> None: pyproject = Path(__file__).resolve().parents[2] / "pyproject.toml" dependencies = tomllib.loads(pyproject.read_text())["project"]["dependencies"] - assert "fbuild>=2.2.1" in dependencies + fbuild_requirement = None + for dependency in dependencies: + if dependency.startswith("fbuild>="): + fbuild_requirement = dependency + break + + assert fbuild_requirement is not None + minimum_version_text = fbuild_requirement.removeprefix("fbuild>=").split(",", maxsplit=1)[0] + minimum_version_parts: list[int] = [] + for part in minimum_version_text.split("."): + minimum_version_parts.append(int(part)) + + assert minimum_version_parts >= [2, 2, 1]🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ci/tests/test_fbuild_boards.py` around lines 19 - 23, The test test_fbuild_dependency_requires_teensy_toolchain_fix currently asserts an exact dependency string; change it to parse the fbuild requirement from dependencies (the dependencies list read from pyproject.toml) and use a semantic version/specifier check (e.g., packaging.specifiers and packaging.version) to assert the minimum allowed version is at least 2.2.1; locate the test function and replace the equality check against the literal "fbuild>=2.2.1" with logic that finds the fbuild requirement string in dependencies, creates a SpecifierSet from it, and verifies that SpecifierSet contains Version("2.2.1") (or that the minimum lower-bound is >= 2.2.1).
1-23: Consolidate these guard tests into an existing test module.This is a small set of CI guard assertions on board configuration and fbuild dependency pinning. Per coding guidelines (
**/test*.{cpp,py,c,h,hpp}: "Consolidate new test cases into existing test files rather than creating new test files for minor additions"), these three tests should move into an existing fbuild or board-related test file instead of creating a standalone module. Considerci/tests/test_fbuild_qemu.pyor another board-configuration test file as consolidation targets.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ci/tests/test_fbuild_boards.py` around lines 1 - 23, Move the three small guard tests (test_teensy_4x_uses_fbuild, test_known_fbuild_boards_remain_enabled, test_fbuild_dependency_requires_teensy_toolchain_fix) out of this standalone module and consolidate them into an existing fbuild/board-related test module (for example, test_fbuild_qemu). Keep assertions unchanged and import FBUILD_BOARDS and tomllib/Path as needed; ensure the pyproject lookup in test_fbuild_dependency_requires_teensy_toolchain_fix still uses the pyproject.toml parent traversal and checks that "fbuild>=2.2.1" is in dependencies. Remove the now-empty ci/tests/test_fbuild_boards.py file after moving the tests.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@pyproject.toml`:
- Around line 8-10: The pyproject currently requires "fbuild>=2.2.1" which is
not published; update the dependency in pyproject.toml to a resolvable source:
either change "fbuild>=2.2.1" to the published "fbuild==2.2.0" or replace it
with a direct VCS/URL reference to the repo/commit/branch that contains the
Teensy GCC 11 fix (instead of the version specifier). Locate the dependency line
containing "fbuild>=2.2.1" and make the swap, or alternatively wait and merge
only after upstream publishes 2.2.1.
---
Nitpick comments:
In `@ci/tests/test_fbuild_boards.py`:
- Around line 19-23: The test
test_fbuild_dependency_requires_teensy_toolchain_fix currently asserts an exact
dependency string; change it to parse the fbuild requirement from dependencies
(the dependencies list read from pyproject.toml) and use a semantic
version/specifier check (e.g., packaging.specifiers and packaging.version) to
assert the minimum allowed version is at least 2.2.1; locate the test function
and replace the equality check against the literal "fbuild>=2.2.1" with logic
that finds the fbuild requirement string in dependencies, creates a SpecifierSet
from it, and verifies that SpecifierSet contains Version("2.2.1") (or that the
minimum lower-bound is >= 2.2.1).
- Around line 1-23: Move the three small guard tests
(test_teensy_4x_uses_fbuild, test_known_fbuild_boards_remain_enabled,
test_fbuild_dependency_requires_teensy_toolchain_fix) out of this standalone
module and consolidate them into an existing fbuild/board-related test module
(for example, test_fbuild_qemu). Keep assertions unchanged and import
FBUILD_BOARDS and tomllib/Path as needed; ensure the pyproject lookup in
test_fbuild_dependency_requires_teensy_toolchain_fix still uses the
pyproject.toml parent traversal and checks that "fbuild>=2.2.1" is in
dependencies. Remove the now-empty ci/tests/test_fbuild_boards.py file after
moving the tests.
🪄 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: 132f1887-a7d2-4e1c-b4c4-59c97845a4cd
📒 Files selected for processing (2)
ci/tests/test_fbuild_boards.pypyproject.toml
| # fbuild 2.2.1+ includes Teensy framework library resolution and the | ||
| # Teensy-compatible GCC 11 toolchain fix needed for teensy40/teensy41. | ||
| "fbuild>=2.2.1", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Expect this to succeed and print package metadata before this PR merges.
# A 404 here means `fbuild>=2.2.1` is not resolvable from PyPI.
curl -fsSL https://pypi.org/pypi/fbuild/2.2.1/json | sed -n 's/.*"version":"\([^"]*\)".*/\1/p' | head -n 1Repository: FastLED/FastLED
Length of output: 108
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Verify fbuild 2.2.0 exists and get its version info
echo "=== Checking fbuild 2.2.0 availability ==="
curl -fsSL https://pypi.org/pypi/fbuild/2.2.0/json 2>/dev/null | jq -r '.info.version' 2>/dev/null || echo "fbuild 2.2.0: Not found or error"
# Check the pyproject.toml file
echo ""
echo "=== pyproject.toml dependencies ==="
cat pyproject.toml | grep -A 5 fbuildRepository: FastLED/FastLED
Length of output: 821
Cannot merge while fbuild>=2.2.1 remains unpublished.
The pyproject.toml requires fbuild>=2.2.1, but this version does not exist on PyPI—only fbuild 2.2.0 is available. Environment resolution will fail. Either wait for fbuild 2.2.1 to be published or use a direct reference to the Teensy GCC 11 fix before merging.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@pyproject.toml` around lines 8 - 10, The pyproject currently requires
"fbuild>=2.2.1" which is not published; update the dependency in pyproject.toml
to a resolvable source: either change "fbuild>=2.2.1" to the published
"fbuild==2.2.0" or replace it with a direct VCS/URL reference to the
repo/commit/branch that contains the Teensy GCC 11 fix (instead of the version
specifier). Locate the dependency line containing "fbuild>=2.2.1" and make the
swap, or alternatively wait and merge only after upstream publishes 2.2.1.
Summary
Notes
2.2.0includes the missingSPI.h/OctoWS2811.hframework library fix, but not the later GCC 11 Teensy toolchain fix from Fix Teensy builds with GCC 11 toolchain fbuild#180Testing
uv run --no-sync pytest ci/tests/test_fbuild_boards.py -qSummary by CodeRabbit
Release Notes
Tests
Chores