windows-metadata winrt metadata roundtrip validation#4704
Merged
Conversation
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.
Makes RDL the reviewable source of truth for all three metadata families (WinRT, Win32, WDK), with
git diffenforcing losslessRDL ↔ winmdround-trips in CI.What changed
tool_windows→tool_winrt: WinRT's generator now inserts an RDL step so it's structurally identical totool_win32/tool_wdk:metadata/winrt/(343 per-namespace.rdlfiles): the committed, human-reviewable WinRT source of truth, mirroringmetadata/win32andmetadata/wdk.tool_roundtrip: a fast, SDK-free validator (depends only onwindows-rdl— no libclang, no NuGet) that re-derives every committed RDL corpus from its committed winmd and relies ongit diff.tool_rdl_roundtrip: bitrotted, superseded bytool_roundtrip.winrtandroundtripto the.github/workflows/gen.ymlmatrix.docs/crates/windows-rdl.md(design + study) andcrates/libs/bindgen/default/readme.md.One-time regen (expected)
Windows.winmdre-bases to its RDL-rebuilt form (semantically identical — decompiling old vs new winmd yields byte-identical RDL).windowscrate (valuefor property setters,handler/tokenfor event add/remove) — cosmetic only: ABI, signatures, types, and vtable order are unchanged.windows-sysis untouched.tool_winrt→tool_packageproduces zero drift.Validation
tool_winrt/tool_packageidempotent (no drift on re-run).tool_roundtrip: WinRT/Win32/WDK reproduce with cleangit diff.cargo clippy -p tool_winrt -p tool_roundtrip --all-targetsclean;fmtclean.