Skip to content
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

Collect all typedefs with same name #2495

Merged
merged 4 commits into from
May 11, 2023
Merged

Conversation

Jake-Shadle
Copy link
Contributor

@Jake-Shadle Jake-Shadle commented May 9, 2023

This fixes an issue introduced in #2475 where all typedefs with the same name are not collected if they aren't explicitly requested by the user.

Let's take Windows.Win32.System.Diagnostics.Debug.RtlCaptureContext as an example.

If we request standalone generation of this function, the code in standalone_imp will find the function, iterate through its parameters, and collect the CONTEXT typedef, however, it will only collect the first one that it finds, which is the aarch64 version in this particular case, causing the x86 and x86_64 CONTEXT typedefs (and their unique nested/referenced typedefs) to not be collected. Previously this worked in 0.49.0 because the top level type collection code used signature_cfg to gather all of the parameter/return types.

Resolves: #2496

@kennykerr
Copy link
Collaborator

Thanks for the contribution - good catch. As a reminder, in future please open an issue with a minimal repro before creating a PR. That just makes it easier for me to isolate and identify the necessary change and track a fix.

@Jake-Shadle Jake-Shadle requested a review from kennykerr May 9, 2023 12:59
@Jake-Shadle Jake-Shadle requested a review from kennykerr May 9, 2023 13:26
@kennykerr
Copy link
Collaborator

Looks like you're hitting some new rustup changes. I'll quickly get those addressed in a separate PR to get this unblocked.

@kennykerr
Copy link
Collaborator

Apologies, I had to step away for 2 days - I have now completed #2497 so you should be able to merge master and get this PR building.

@kennykerr kennykerr merged commit 6f6b384 into microsoft:master May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: All types of a specific name are not collected
2 participants