refactor(platform-common): adopt odp_client::impl_odp_relay_handler! (Phase 2b)#2
refactor(platform-common): adopt odp_client::impl_odp_relay_handler! (Phase 2b)#2dymk wants to merge 2 commits into
Conversation
Cargo Vet Audit Failed
If the unvetted dependencies are not neededPlease modify Cargo.toml file to avoid including the dependencies. If the unvetted dependencies are neededPost a new comment with the questionnaire below to the PR to help the auditors vet the dependencies. Copy and paste the questionnaire as a new comment and provide your answers:1. What crates (with version) need to be audited? 2. How many of the crates are version updates vs new dependencies? 3. To confirm none of the already included crates serve your needs, please provide a brief description of the purpose of the new crates. 4. Any extra notes to the auditors to help with their audits. |
Switch dev-qemu from SmbusEspiMedium to MctpSerialMedium for the uart-service, using DSP0253 serial framing with CRC-16 instead of SMBus/eSPI framing. Note: this will require a corresponding ec-test-cli update to support DSP0253 serial framing before the integration-test CI job passes.
embedded-services PR OpenDevicePartnership#11 (currently dymk/odp-canonical-wire-and-odp-client @ b00c3a7) deleted embedded_services::relay::mctp::impl_odp_mctp_relay_handler! and replaced it with odp_client::impl_odp_relay_handler! in a new odp-client crate. This commit migrates platform-common to the new path and re-pins all embedded-services-sourced deps (direct and transitive) through Cargo [patch] sections so this PR can ship to the personal fork before PR OpenDevicePartnership#11 merges upstream. Files: - platform/platform-common/Cargo.toml: add odp-client direct dep - platform/platform-common/src/lib.rs: swap macro path embedded_services::relay::mctp::impl_odp_mctp_relay_handler! -> odp_client::impl_odp_relay_handler! (macro grammar unchanged — argument list is identical) - platform/{platform-common,dev-qemu,dev-imxrt,dev-npcx,dev-mcxa,dev-mec}/Cargo.toml: add identical [patch."https://github.com/OpenDevicePartnership/embedded-services"] block re-routing 14 embedded-services workspace crates to the dymk fork rev b00c3a7. REVERT THIS BLOCK once PR OpenDevicePartnership#11 merges to upstream. - platform/*/Cargo.lock: updated to resolve from the dymk fork rev Gates (all 5 CI-matrix platforms pass cargo clippy --locked + fmt --check; dev-qemu also passes cargo build --locked for riscv32imac-unknown-none-elf): - platform-common / dev-qemu / dev-imxrt / dev-npcx / dev-mcxa: clippy clean - dev-qemu binary: 6.3 MB ELF produced A pre-existing clippy::clone_on_copy finding in platform-common/src/mock/battery.rs:35 is gated behind --all-features --all-targets which is NOT part of CI scope (CI runs default-features clippy per platform). Reproduces unchanged on origin/main; out of scope for this PR.
9530456 to
d3652e5
Compare
|
Superseded by a fresh-eyes minimal approach. The serial-medium idea here is right, but this branch bundles it with the |
Summary
Migrates
platform/platform-common/src/lib.rsfrom the deletedembedded_services::relay::mctp::impl_odp_mctp_relay_handler!macro toodp_client::impl_odp_relay_handler!, and re-pins all embedded-servicesdeps to the dymk fork at rev
b00c3a7while PR #11 (canonical ODP wireformat + odp-client crate) awaits upstream merge.
This is Phase 2b of PLAN-006 (cross-repo ODP message-type consolidation).
Why
embedded-servicesPR OpenDevicePartnership#11 deletedembedded_services/src/relay/mctp/andmoved the relay-handler macro into a new
odp-clientcrate. Any consumerthat bumps its
embedded-servicespin past that PR will fail to builduntil this migration lands. Branch
dymk/dev-qemu-mctp-serial-mediumpreviously bumped
branch = "v0.2.0"→branch = "main"(commitalready squashed during this rebase as it was applied upstream as OpenDevicePartnership#23),
so this PR is the natural follow-up.
Changes
platform/platform-common/src/lib.rsplatform/platform-common/Cargo.tomlodp-clientdirect dep +[patch]blockplatform/{dev-qemu,dev-imxrt,dev-npcx,dev-mcxa,dev-mec}/Cargo.toml[patch]block (14 entries) re-routing embedded-services deps to dymk fork revb00c3a7platform/*/Cargo.lockPin reversion plan
Once
OpenDevicePartnership/embedded-servicesPR OpenDevicePartnership#11 merges to upstreammain, a follow-up will delete the 6[patch.\"https://github.com/OpenDevicePartnership/embedded-services\"]blocks and
cargo updatewill re-resolve to upstream.Validation
All 5 CI-matrix platforms pass
cargo clippy --lockedandcargo fmt --check:platform-common/dev-qemu/dev-imxrt/dev-npcx/dev-mcxaAlso verified:
dev-qemubuilds a 6.3 MBriscv32imac-unknown-none-elfELFdev-mec(not in CI matrix) builds cleanlyA pre-existing
clippy::clone_on_copyfinding inplatform-common/src/mock/battery.rs:35is gated behind--all-features --all-targets, which is NOT part of CI scope(CI runs default-features
clippy --lockedper platform). Reproducesunchanged on
origin/main. Out of scope for this PR.Parallel-safe
Independent of Phase 2 (
dymk/odp-secure-services#3) and Phase 3(
dymk/odp-platform-common). All three feed into theodp-platform-qemu-sbsaintegration PR (Phase 4).