Repository navigation
Closed
Description
Actual reproducer
The CH32V platform manifest says version 1.1.0, but [email protected] is not published in the PlatformIO registry. PlatformIO cannot resolve either that pin or unpinned ch32v; the upstream project instructs users to install its GitHub source. The valid pinned source repro is:
[env:ch32v003]
platform = https://github.com/Community-PIO-CH32V/platform-ch32v.git#b7397c29a71101175bfc94f6ab06f9daac336458
board = genericCH32V003F4P6
framework = arduinoAt this commit, platform.py sets FORCE_DOWNGRADE_TO_GCC8 = True. For Arduino on Linux it selects the default branch of toolchain-riscv-linux.git (GCC 8.2.0, riscv-none-embed-*) and the board-selected OpenWCH framework source. The old native fbuild adapter instead selected its fixed xPack GCC 14.2.0 and fixed framework commit. A registry pin such as [email protected] must fail clearly, never continue with those defaults.
Required behavior
- Use the shared generic PlatformIO source/requirement resolver from meta: resolve PlatformIO package aliases and build requested stacks #1491. Resolve a selected CH32V VCS platform ref to an immutable commit and use its manifest, host-specific toolchain selection, board/core framework choice, and explicit
platform_packagesprecedence. Preserve archive/URL overrides. - Resolve selected VCS packages to immutable commit archives and registry package pins to their exact host payloads/checksums. Do not substitute fbuild's default xPack/OpenWCH packages for an unavailable alias, ref, host, or unsupported package.
- Discover the actual compiler executable family from the selected toolchain, preserve the selected board ISA/ABI, and include requested/resolved platform, compiler, and framework identities in build output. A changed resolved ref must invalidate the build fast path.
- Keep unpinned bare
platform = ch32vcompatible with the legacy native defaults until a real registry alias exists.
Testing criteria
- Offline core test: parse and lock the pinned VCS platform source, assert stable source identity, manifest package requirements, and explicit package-pin precedence. Generic host/payload and typed/qualified path cases remain covered by the shared core tests from meta: resolve PlatformIO package aliases and build requested stacks #1491.
- Offline adapter tests: select Linux GCC 8/OpenWCH from a 1.1.0 platform fixture; cover explicit override precedence, unsupported hosts, and unavailable refs without fallback.
- Real-source integration test: download the pinned platform/toolchain/framework in an isolated cache, verify GCC 8.2.0 and its executable prefix, and build the checked-in CH32V003 sketch. Assert requested/resolved identities in the build log.
- Install check/dry-run must fail before fetching an uncached repository platform source.
Evidence
- Source: Community-PIO-CH32V/platform-ch32v.
- Original failure and corrections are recorded in this issue's comments.
- Parent meta issue: meta: resolve PlatformIO package aliases and build requested stacks #1491.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsTriage
Activity
zackees commentedon Sep 26, 2026
Testing-criteria clarification: this child’s representative platform fixture must pass through the public, platform-agnostic
fbuild-coreresolver specified in #1491, then through its native adapter. Assert the exact requested payload/source identities (including host-specific URL and checksum when published), manifest dependency and explicit override precedence, and no substitution by the family default. Core unit tests must also cover synthetic unknown-platform and generic PlatformIO package paths independently of native build support. Keep offline unit tests separate from the actual compile/build integration repro.zackees commentedon Sep 27, 2026
Revalidation on 2026-09-27 found the short-name registry repro is invalid upstream:
uvx --from platformio pio pkg show -t platform [email protected]reportsCould not find ... package in the PlatformIO Registry; unpinnedch32valso fails. The registry API returns 404 forcommunity-ch32v/platform/ch32v(control:platformio/platform/espressif32returns 200). The upstream CH32V README instructs installation by GitHub URL, and itsplatform.jsonversion 1.1.0 is not evidence of registry publication. I am treating the valid CH32V case as a GitHub/VCS platform source and checking its host-specific package resolution; the short alias must fail early rather than silently use fbuild defaults. The RED/GREEN criteria above need this correction before they can be claimed satisfied.zackees commentedon Sep 27, 2026
Further correction from the actual platform source at commit
b7397c29a71101175bfc94f6ab06f9daac336458(manifest version 1.1.0): itsplatform.pysetsFORCE_DOWNGRADE_TO_GCC8 = Trueand clearsgcc_branchfor Arduino, then selects the host-specifictoolchain-riscv-linux.gitdefault branch on Linux. That branch containsriscv-none-embed-gcc8.2.0;#gcc12is not selected for this pinned Arduino repro. The valid GitHub-source acceptance test must assert GCC 8.2.0 /riscv-none-embed-*, not GCC 12. I caught this by fetching the pinned platform archive in an isolated cache and running a real-source resolution test; the initial simplified fixture had missed the downgrade branch.[-]fix(ch32v): honor platform registry version and toolchain pins[/-][+]fix(ch32v): honor PlatformIO VCS platform source and package pins[/+]fix(ch32v): honor selected PlatformIO platform and package pins (#1530)