config: port remaining emitters into resolve() (phase 2b)#478
Open
w1ne wants to merge 4 commits into
Open
Conversation
Ports every remaining TS emitter from board-config/src/compile/emitters.ts into the Rust resolve(): SPI (ili9341/max31855/ssd1680), ultrasonic, pcd8544, sn74hc165, iolink-master, neo6m-gps, can-diagnostic-tool, and the ADC-input board_io branch. board_io_kind is now a total faithful port of CATALOG.boardIoKind; bus lookups cover the STM32 F103/F401/L476/H563 base map. Removes UnsupportedInPhase2a: the TS oracle is total over part types (it emits nothing for unclaimed parts rather than throwing), so resolve() now faithfully ignores unhandled/unbound parts to preserve byte-for-byte parity. Gated by resolve_matches_ts_oracle over all 13 STM32 fixtures (10 new).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completes the phase-2 resolver: every remaining TS emitter (
board-config/src/compile/emitters.ts) is now ported into the Rustresolve(), byte-for-byte gated against the TS oracle snapshots.Ported
board_iobranchboard_io_kindis now a total faithful port ofCATALOG.boardIoKind; bus lookups cover the STM32 F103/F401/L476/H563 base mapUnsupportedInPhase2aremoved. The TS oracle is total over part types — it emits nothing for unclaimed parts rather than throwing — soresolve()now faithfully ignores unhandled/unbound parts to keep byte-parity.resolve_rejects_unported_part_typesreplaced withresolve_ignores_unhandled_and_unbound_parts.Gate:
resolve_matches_ts_oracleasserts byte-equality over all 13 STM32 fixtures (10 new). Fixtures + expected YAML are embedded verbatim from the board-config snapshot, so this test is self-contained.Honest limitation: 3 planned non-STM32 GPIO fixtures (RP2040/ESP32/nRF) were dropped — the TS oracle (
diagramToConfig) throws for boards absent fromCHIP_YAMLS(only stm32f103/f401/l476 exist), so there's no oracle snapshot to gate against.parse_mcu_pinalready handles those boards' GPIO; bus lookups correctly return None (faithful tofindPinFunctionon an unmapped board).Local:
cargo fmt --all -- --checkclean,cargo test -p labwired-config canonical13 passed.