-
Notifications
You must be signed in to change notification settings - Fork 494
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
Update metadata to 10.2.84-preview and regroup UseTrees #834
Conversation
f2fbe29
to
9bca156
Compare
I didn't run into missing type issues; if there's anything here worth scavenging, feel free riverar@b2e0ade |
@riverar I get the same |
@MarijnS95 Are you on rustc |
I'd be surprised if it's that, given that the baseline |
@MarijnS95 |
@MarijnS95 Do we know why HRESULT is on the type exclusion list here? Removing this resolves the problem, but I'm wondering if that's just a hack covering up a problem.
|
Types that are represented both in WinRT and Win32 must be excluded and defined by the Windows crate directly. |
Found the culrpit: |
3ee003d
to
046983c
Compare
@MarijnS95 Nice, looks good! |
.resolve_type_def(type_def.namespace(), type_def.name()) | ||
.into() | ||
} | ||
TypeDefOrRef::TypeDef(type_def) => match type_def.full_name() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is something I still need to fix. There's no guarantee the types will be TypeDefs or TypeRefs. I was hoping in practice they'd only be TypeRefs as that's simpler but as long as the TypeDef resides in the same PE file then they can be TypeDefs. Ideally the arch-specific types would be TyepRefs though. That's a bug in the metadata (see comment below).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#845 deals with these issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which of the two do you want to merge first? I think I can kick off the second commit if #845 goes in prior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, will complete 845.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, by kicking off the second commit the metadata import from nuget got lost as well, apologies. Thanks for pushing that back @kennykerr :)
I can only accept the winmd from the release. |
With aforementioned fix in the second commit this is now using the release blob - I'll remove that note from the description. |
@@ -24,7 +24,7 @@ pub fn gen_bstr() -> TokenStream { | |||
return 0; | |||
} | |||
|
|||
unsafe { SysStringLen(self) as usize } | |||
unsafe { super::System::OleAutomation::SysStringLen(self) as usize } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems wrong. Created an issue: microsoft/win32metadata#517
046983c
to
c740de0
Compare
This looks good - I need to get the update in. Can you take care of the conflicts and then I'll merge this in. |
Self-induced conflicts with all the formatting 😬. Can we get #844 in first so that I can tackle them all at once? |
Done. |
c740de0
to
ded3bbc
Compare
@kennykerr Updated. Please give this some thorough scrutineering, most changes didn't survive autoformatting nor the removal of enum constants. |
Note that some common paths in |
ded3bbc
to
31a8050
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
The 10.2.84-preview
win32metadata
just dropped and only required few extra modifications since starting on this a few weeks ago, to regroup and clean upUseTree
s. Not all are done yet, but it should look a lot better already (also keeping in mind #827/#828).Note that this uses the file from https://github.com/microsoft/win32metadata/tree/v10.2.84-preview/scripts/BaselineWinmd because the nuget package appears to miss some types from the foundation namespace 🤔 - still investigating.The broken types switched fromTypeRef
toTypeDef
.