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

Fix Debug impls for COM interfaces #3066

Merged

Conversation

sivadeilra
Copy link
Collaborator

Currently, the Debug impl for COM interfaces shows the recursive interface chain, like so:

IDWriteFontFace5(IDWriteFontFace4(IDWriteFontFace3(IDWriteFontFace2(IDWriteFontFace(0xNNN)))))

That's not very useful. This PR trims it down to just the current interface:

IDWriteFontFace5(0xNNN)

Arlie Davis added 2 commits June 3, 2024 02:06
Currently, the Debug impl for COM interfaces shows the recursive
interface chain, like so:

```
IDWriteFontFace5(IDWriteFontFace4(IDWriteFontFace3(IDWriteFontFace2(IDWriteFontFace(0xNNN)))))
```

That's not very useful. This PR trims it down to just the current interface:

```
IDWriteFontFace5(0xNNN)
```
@sivadeilra sivadeilra requested a review from dpaoliello June 3, 2024 17:41
@sivadeilra sivadeilra merged commit b8586ad into microsoft:master Jun 3, 2024
90 checks passed
@sivadeilra sivadeilra deleted the user/ardavis/interface-debug-impl branch June 3, 2024 18:09
Comment on lines +423 to +425
println!("IUnknown = {iunknown:?}");
let ifoo: IFoo = app.to_interface();
println!("IFoo = {ifoo:?}");
Copy link
Collaborator

@kennykerr kennykerr Jun 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not tests. 😉 #3068

mati865 pushed a commit to mati865/windows-rs that referenced this pull request Jun 15, 2024
* Fix Debug impls for COM interfaces

Currently, the Debug impl for COM interfaces shows the recursive
interface chain, like so:

```
IDWriteFontFace5(IDWriteFontFace4(IDWriteFontFace3(IDWriteFontFace2(IDWriteFontFace(0xNNN)))))
```

That's not very useful. This PR trims it down to just the current interface:

```
IDWriteFontFace5(0xNNN)
```

* fix build break

---------

Co-authored-by: Arlie Davis <ardavis@microsoft.com>
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.

4 participants