Skip to content

Require fbuild Teensy toolchain fix - #2375

Merged
zackees merged 1 commit into
masterfrom
fix-fbuild-teensy-toolchain
Apr 22, 2026
Merged

zackees merged 1 commit into
masterfrom
fix-fbuild-teensy-toolchain

Conversation

@zackees

@zackees zackees commented Apr 22, 2026 •

Copy link
Copy Markdown
Member

Summary

  • bump the FastLED fbuild requirement to the release expected to contain the Teensy framework-library and GCC 11 toolchain fixes
  • keep Teensy 4.0/4.1 routed through fbuild
  • add CI-side guard tests for fbuild board routing and dependency floor

Notes

  • fbuild 2.2.0 includes the missing SPI.h / OctoWS2811.h framework library fix, but not the later GCC 11 Teensy toolchain fix from Fix Teensy builds with GCC 11 toolchain fbuild#180
  • this PR intentionally targets the next packaged fbuild release containing that merged fix

Testing

  • uv run --no-sync pytest ci/tests/test_fbuild_boards.py -q

Summary by CodeRabbit

Release Notes

  • Tests

    • Added validation tests for Teensy board support and project dependencies.
  • Chores

    • Updated fbuild dependency to version 2.2.1 for improved Teensy board toolchain support.

@coderabbitai

coderabbitai Bot commented Apr 22, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This 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

Cohort / File(s) Summary
Test Module Addition
ci/tests/test_fbuild_boards.py
New test module with three test functions validating: Teensy 4.x board inclusion in FBUILD_BOARDS, retention of known boards (uno, esp32dev), and presence of fbuild>=2.2.1 dependency constraint.
Dependency Constraint Update
pyproject.toml
Bumped fbuild minimum version from >=2.2.0 to >=2.2.1 with inline comment documenting Teensy toolchain/framework resolution behavior introduced in fbuild 2.2.1+.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Possibly related issues

Possibly related PRs

Poem

🐰 Hopping through boards with fbuild in sight,
Teensy 4.x now routed just right,
Tests affirm each pin and each gate,
Version 2.2.1—our dependencies mate!
The framework hops forward, batteries bright! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title directly and clearly summarizes the main change: bumping the fbuild dependency to require a Teensy toolchain fix, which is reflected in both the pyproject.toml version bump and the new test module.
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 fix-fbuild-teensy-toolchain

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.

@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

🧹 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 as fbuild>=2.2.2 or fbuild>=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. Consider ci/tests/test_fbuild_qemu.py or 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

📥 Commits

Reviewing files that changed from the base of the PR and between e713d6f and 3312d2b.

📒 Files selected for processing (2)
  • ci/tests/test_fbuild_boards.py
  • pyproject.toml

Comment thread pyproject.toml
Comment on lines +8 to +10
# 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",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 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 1

Repository: 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 fbuild

Repository: 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.

@zackees
zackees merged commit 5b699ab into master Apr 22, 2026
2 of 80 checks passed
@zackees
zackees deleted the fix-fbuild-teensy-toolchain branch August 21, 2026 19:15
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.

1 participant