-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve diagnostics when encountering TypeRef
in metadata
#2742
Comments
I'm working on some winmd validation. It will be some time before this is available, but its goal is to catch stuff like this. |
As it turns out the proper fix for microsoft/win32metadata#1760 was simply that the new Win32 winmd I was generating was referencing newer types from the "API contracts" that windows-rs was using. Updating them here (#2745) allows me to once again regenerate This means somewhere |
Yes, I intentionally use TypeRefs in this case so that the panic message gives you a clue of what's missing. |
Clarifying that precedent in the panic message might be useful, then :) |
#3099 added some further assistance in this regard. I'm not planning on doing anything else right now so I'll just close this old issue. Feel free to report any further pain points. |
TypeRef
currently raises anunimplemented!()
assuming this i something that could be implemented at some point:windows-rs/crates/libs/bindgen/src/rust/writer.rs
Line 173 in 831b99b
This is showing when generating (custom) metadata on (top of)
win32metadata
main
(currently at microsoft/win32metadata@3d65d37):This is caused by an upstream issue, where metadata is missing for a type that is used by other functions (microsoft/win32metadata#1760).
riddle
needs to understand the type here, and for that the generator should emit a more descriptive diagnostic upon encounteringTypeRef
.Originally posted by @MarijnS95 in #2539 (comment)
The text was updated successfully, but these errors were encountered: