Repository navigation
Description
Context
The AVR resolver accepts a registry-version platform_packages entry but builds with the family default. A focused repro uses the existing tests/platform/atmega8 board fixture:
[env:atmega8]
platform = atmelavr
board = ATmega8
framework = arduino
platform_packages = framework-arduino-avr-minicore@3.1.0The ATmega8 board metadata selects core = MiniCore (crates/fbuild-config/assets/boards/json/ATmega8.json). The PlatformIO platform-atmelavr manifest maps the MiniCore framework to package framework-arduino-avr-minicore with version ~3.1.0. fbuild’s registry-version warning recognizes the pin, but avr_packages only resolves URL overrides for framework-arduino-avr and framework-arduino-avr-attiny; avr_framework_package routes those overrides only for core keys arduino, tiny, and tinymodern. MiniCore falls through to AvrFramework::for_core, whose embedded registry resolves MCUdude/MiniCore 2.2.2 (crates/fbuild-library/assets/avr_frameworks.json). Thus an explicit registry framework pin can be accepted while fbuild selects its distinct 2.2.2 default.
This is separate from the completed URL-override wiring in #667 and #669: those cover the standard Arduino AVR and ATTiny canonical keys, not registry semver resolution for other AVR package names.
Proposal
Resolve valid AVR platform = name@version and platform_packages = package@version aliases against PlatformIO platform/package metadata, including core-specific framework mappings, and build with the requested packages. Fail before compilation only for unavailable versions or genuinely unsupported inputs. Keep standard AVR and ATTiny URL/archive override behavior intact.
PlatformIO alias requirement
Resolve PlatformIO-hosted platform and framework package aliases to exact archive URLs/checksums. The AVR core-to-package map must select the requested registry package, including MiniCore, rather than applying a generic AVR default; preserve explicit URL overrides.
Acceptance criteria
- RED: add a focused resolution test or isolated build with the ini above and show the requested MiniCore package
3.1.0is currently replaced with fbuild’s2.2.2default; cover that the warning does not make the pin effective. - GREEN: valid published AVR platform and framework package aliases resolve their requested versions plus compatible dependencies and build with them; the MiniCore
3.1.0repro no longer selects the2.2.2default. Unavailable or unsupported aliases fail before compilation; rejecting a valid supported alias is not completion. - Cover core-specific package mappings, including MiniCore and the already-wired standard AVR / ATTiny packages; preserve URL/archive overrides.
- Make requested and resolved framework/toolchain versions visible in output or machine-readable build metadata.
- Unit tests: table-drive
AtmelAvrandAtmelMegaAvrregistry/manifest fixtures through the sharedfbuild-coreresolver, including MiniCore3.1.0, Arduino AVR, and ATTiny package names; assert board-core mapping, exact payload URL/checksum, override precedence, and no fallback to the embedded2.2.2MiniCore default.
Decisions
- Group AVR and megaAVR resolver work under this family because the AVR framework JSON and orchestrator are shared; this report uses the concrete atmelavr MiniCore mismatch.
- Treat an explicit framework registry pin substituted by a family default as a correctness and reproducibility defect, even when fbuild emits the A pinned platform version is silently ignored — in
platformand inplatform_packages#1407 warning. - Use ATmega8 as the minimal repro because its checked-in board metadata selects MiniCore, making the actual default package unambiguous.
Related issues
- A pinned platform version is silently ignored — in
platformand inplatform_packages#1407 added warning visibility for ignored pins but does not resolve them. - audit: avr / framework-arduino-avr — does platform_packages override work? (parent #664) #667 and audit: attiny — does platform_packages override work? (parent #664) #669 cover AVR/ATTiny URL-based
platform_packagesoverride paths, not registry-version pins.
Core and AVR testing gate
- RED → GREEN: add failing exact-payload assertions for AVR and megaAVR to the shared offline
fbuild-coregeneric-path suite before changing their adapters. Include MiniCore3.1.0, standard Arduino AVR, and ATTiny; generic short, owner-qualified, and typed paths must resolve independently of the native platform enum. - Assert exact platform/framework/toolchain payload version, host URL/SHA-256, stable cache identity, manifest dependencies, board-core mapping, and explicit
platform_packagesprecedence. The MiniCore fixture must never resolve to fbuild's embedded2.2.2default. - Separate AVR/megaAVR adapter/build tests must consume those core results, preserve URL/archive overrides, and report requested versus resolved identities. The shared core suite runs offline in CI without PlatformIO or compiler downloads.
Metadata
Metadata
Assignees
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
Registry verification (2026-09-27): PlatformIO currently publishes
framework-arduino-avr-minicoreversions3.1.2,3.0.2, and2.2.2, but not exact3.1.0. The atmelavr manifest declares~3.1.0, which can select the published 3.1.2 payload;platform_packages = framework-arduino-avr-minicore@3.1.0must instead fail before compilation as unavailable, never fall back to fbuild’s embedded 2.2.2. I will use exact@3.1.2for the successful pinned-build test and keep@3.1.0as the unavailable-version regression. Registry source: https://api.registry.platformio.org/v3/packages/platformio/tool/framework-arduino-avr-minicore .