Skip to content

build: use soldr PEP517 backend for local installs#1092

Merged
zackees merged 8 commits into
mainfrom
feat/1726-soldr-pep517
Jul 16, 2026
Merged

build: use soldr PEP517 backend for local installs#1092
zackees merged 8 commits into
mainfrom
feat/1726-soldr-pep517

Conversation

@zackees

@zackees zackees commented Jul 16, 2026

Copy link
Copy Markdown
Member

Summary\n- make soldr the PEP 517 backend for fbuild source installs\n- delegate all PEP 517/660 hooks to setuptools so setup.py keeps staging the CLI, daemon, and PyO3 extension\n- remove the obsolete fbuild build_backend.py adapter and preserve the release override as --config-settings profile=release through soldr\n- use line-tables-only debug info for the fast local dev profile\n- require soldr >= 0.8.19, the first soldr release containing delegated PEP 517 hooks\n\nRelated: zackees/soldr#1726, #1733; soldr PR #1734\n\nValidation: uv run --no-project ruff check setup.py; pyproject backend/delegate TOML assertion; delegated editable metadata hook; git diff --check. Full install timing remains a separate gate in the soldr meta issue.

Summary by CodeRabbit

  • Build & Packaging
    • Switched PEP 517 builds to Soldr (adds soldr>=0.8.19 for dev wheel rebuilds).
    • Release builds now use --config-settings profile=release, with profile selection via SOLDR_PEP517_PROFILE.
    • Development debug output now uses line-table-only debug info.
    • Removed the legacy custom PEP 517 adapter and no longer includes build_backend.py in source distributions.
  • Documentation
    • Updated installation guidance to use profile=release.
  • Style
    • Reformatted several Windows/Rust log and warning messages for readability.
  • Tests
    • Minor test adjustments/formatting.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@zackees, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 56 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 171cce13-5d86-4f24-b096-63a57e3f2031

📥 Commits

Reviewing files that changed from the base of the PR and between f0508fa and 7bb537d.

📒 Files selected for processing (1)
  • crates/fbuild-deploy/src/rp2040.rs
📝 Walkthrough

Walkthrough

The project replaces its local PEP 517 adapter with soldr delegating to setuptools, changes profile selection to SOLDR_PEP517_PROFILE, updates release-build documentation, removes the adapter from the manifest, enables line-table debug information for development builds, and reformats several Rust sections.

Changes

PEP 517 backend migration

Layer / File(s) Summary
Backend delegation and build configuration
pyproject.toml, MANIFEST.in, Cargo.toml
PEP 517 builds now use soldr with setuptools delegation, the local adapter is removed from manifest inclusion, and development builds emit line-table debug information.
Release profile selection and documentation
setup.py, docs/getting-started/README.md
Profile handling now reads SOLDR_PEP517_PROFILE, supports development and release values, rejects unsupported values, and documents profile=release.
Rust formatting and build-test updates
crates/fbuild-build-esp/..., crates/fbuild-build/tests/avr_build.rs, crates/fbuild-cli/src/cli/*, crates/fbuild-serial/src/ports.rs
Rust logging, imports, Windows enumeration expressions, module ordering, assertions, command invocation formatting, and AVR build parameters are updated without changing the described runtime flows.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PEP517Frontend
  participant soldr
  participant setuptoolsBuildMeta
  participant setupPy
  PEP517Frontend->>soldr: invoke PEP 517 build hook
  soldr->>setuptoolsBuildMeta: delegate build hook
  setuptoolsBuildMeta->>setupPy: execute setuptools build
  setupPy->>setupPy: read SOLDR_PEP517_PROFILE
Loading

Possibly related PRs

  • FastLED/fbuild#1086: Introduces the local PEP 517 adapter and the earlier profile-setting translation replaced by this migration.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 18.18% 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 title clearly summarizes the main change: switching local installs to the soldr PEP 517 backend.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/1726-soldr-pep517

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.

@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

🤖 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 `@pyproject.toml`:
- Around line 58-69: Update the [dependency-groups] dev dependency list to
include soldr>=0.8.19 alongside the existing fbuild-dev-tools and setuptools>=64
entries, ensuring soldr is installed before the non-isolated build runs. Keep
the existing build-system configuration unchanged.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9975ad0c-be9c-4efe-80ab-19170e4dce04

📥 Commits

Reviewing files that changed from the base of the PR and between 41208f2 and 1c9ed8d.

📒 Files selected for processing (6)
  • Cargo.toml
  • MANIFEST.in
  • build_backend.py
  • docs/getting-started/README.md
  • pyproject.toml
  • setup.py
💤 Files with no reviewable changes (2)
  • MANIFEST.in
  • build_backend.py

Comment thread pyproject.toml
@zackees

zackees commented Jul 16, 2026

Copy link
Copy Markdown
Member Author

Update after commit 0789e83b:

  • pyproject.toml now seeds soldr>=0.8.19 in the default dev environment as the fallback for uv's no-build-isolation path, in addition to the preview extra-build-dependencies entry.
  • The migrated editable and wheel builds completed successfully in an isolated private Cargo home/target. The clean-target run was intentionally cache-disabled and is correctness evidence only, not a speed claim. Comparable cache-enabled post-migration timing remains gated on a clean host and soldr 0.8.19 release.
  • Current CI has unrelated formatting drift from main plus the expected pre-release soldr availability gate; all board build jobs observed so far pass.

@zackees

zackees commented Jul 16, 2026

Copy link
Copy Markdown
Member Author

The soldr release prerequisite is now prepared as zackees/soldr#1736, bumping the workspace, npm package, and lockfile to 0.8.19. This PR remains install-gated until that release is merged and published; no direct tag or publish action was taken.

@zackees
zackees force-pushed the feat/1726-soldr-pep517 branch from df480c1 to 0b5280d Compare July 16, 2026 11:21
@zackees

zackees commented Jul 16, 2026

Copy link
Copy Markdown
Member Author

Rebased onto current fbuild main at 2c24dddd (including the new clean_all field); the earlier macOS/Windows failures were stale-base errors, not migration errors. The branch is now force-updated at 0b5280dd and formatting is clean.

@zackees

zackees commented Jul 16, 2026

Copy link
Copy Markdown
Member Author

The current-main CI baseline had one remaining compile defect: BuildParams gained clean_all, but crates/fbuild-build/tests/avr_build.rs did not initialize it. Added clean_all: false in commit 4ed5450a; this is a one-line compatibility fix required for the rebased PR to reach backend validation.

@zackees

zackees commented Jul 16, 2026

Copy link
Copy Markdown
Member Author

Correction: the first AVR patch matched an existing initializer and produced a duplicate field while leaving the shared helper incomplete. Commit 344f3e8e removes the duplicate and adds clean_all: false to the actual uno_build_params helper. Formatting and diff checks pass; CI has been restarted.

@zackees
zackees force-pushed the feat/1726-soldr-pep517 branch from 62cd5b4 to f0508fa Compare July 16, 2026 14:21
@zackees
zackees merged commit c8bd221 into main Jul 16, 2026
20 of 93 checks passed
@zackees
zackees deleted the feat/1726-soldr-pep517 branch July 16, 2026 14:29
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