Repository navigation
fix(esp32): honor .git#<ref> platform pins instead of building pioarduino stable (#1662) - #1726
Conversation
…uino stable (#1662) A platform = <repo>.git#<ref> pin fell through to warn_unhonored_platform_pin and built pioarduino stable, so an IDF6 request reported a green SDK 5.5 build. Route repository sources through the shared resolve_cached_source (commit-keyed archive, reused lock) and make any other unresolvable URL pin a hard error.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Repository pin resolution and validation crates/fbuild-build-esp/src/esp32/orchestrator/packages_platform.rs |
pioarduino_platform resolves repository references when fetching is enabled and uses the resolved archive override. Unsupported URL pins return package errors. Tests cover repository-ref parsing, exclusions, resolution failures, and cached commit archive selection. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Possibly related issues
- FastLED/FastLED#3515: The repository-ref resolution affects the
prep_IDF6platform binding required by this issue; it does not add the issue’s driver tests or hardware validation.
Possibly related PRs
- FastLED/fbuild#1505: Both PRs change ESP32 platform selection in
packages_platform.rs; that PR handles registry and archive pins, while this PR adds repository-ref handling. - FastLED/fbuild#1530: This PR uses the cached-source resolver added by PR
#1530for ESP32 repository platform pins.
Merge Risk: 
Minimal · up to 36cae
-
The identified SSH-style pin concern does not prevent supported ESP32 platform pins from resolving. The change is mergeable after normal checks.
Pre-merge checks: 
3 · 
2
-
Failed checks: 2 warnings Passed checks: 3 passed-
Full details: Out of Scope Changes check
-
Explanation
The changes are limited to ESP32 platform source selection, repository resolution errors, dry-run behavior, and related tests. These changes directly support issue
#1662. No unrelated FastLED build-file redesign or annotation/flash optimization work is shown.
-
Full details: Linked Issues check
-
Explanation
Issue
#1662requires the requested VCS ref and dependencies to build against the selected stack, plus build output or metadata that identifies the resolved repository commit and SDK. The changed resolver does select a commit-specific archive and returns explicit resolution errors. The reported IDF6 build still stops at an upstreamtasmota/esptoolHTTP 404, so a build against the selected stack is not established. The PR states that the resolved commit and SDK are logged only and are not recorded inbuild_info.json; this does not meet the metadata requirement. Archive pins and commit-lock behavior have focused test coverage.Resolution
Add build output or metadata that records the actual resolved repository commit and SDK. Provide a successful build against the selected VCS stack, or make the unsupported dependency failure explicit and actionable before compilation with the required focused coverage.
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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 @coderabbitai help to get the list of available commands.
Fixes #1662.
Root cause
pioarduino_platform(packages_platform.rs) handledplatform_packagesoverrides, registry@versionpins and release-archive URLs. Aplatform = https://github.com/<o>/<r>.git#<ref>matched none of them, sowarn_unhonored_platform_pinlogged a warning and built pioarduino stable. The IDF6 request in the issue produced a green SDK 5.5.5 build.Change
platformio_repository::resolve_cached_source(the path CH32V uses). The ref is resolved to a commit withgit ls-remoteand installed fromarchive/<sha>.tar.gz, and the commit lock is reused by later builds. The archive URL carries the commit, so different refs cannot alias a payload.PackageErrornaming the two supported forms, instead of a silent fallback to stable.fetch=false) reports the platform as would-fetch rather than runninggit ls-remote.Verification
soldr cargo test -p fbuild-build-esp: 163 pass. Workspace clippy with-D warningsis clean.platform = https://github.com/pioarduino/platform-espressif32.git#prep_IDF6andboard = esp32dev:resolved requested ESP32 platform …#prep_IDF6 to …/archive/f0c3a7bb53a2f6c730d8eed5770a57b7f5c300d5.tar.gz.platform.jsonpinstasmota/esptoolv5.6.0/esptool-linux-amd64.zip, which returns HTTP 404 upstream. An honest error instead of a stable build is the outcome the issue asks for. Whether the IDF6 stack compiles once upstream publishes that asset is a separate question.FastLED impact
No board in FastLED's current
ci/boards.pyuses a.git#refESP32 platform. The IDF6 board moved to the 61.04.00-RC1 release zip, andESP32_IDF_LATEST_PIOARDUINOis set to#developbut no board uses it.Not covered
Recording the resolved commit and SDK in
build_info.json. They are logged only.Summary by CodeRabbit