Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Feature "UI_Xaml" doesn't compile with windows-rs 0.29-git #34

Closed
mehmooda opened this issue Dec 29, 2021 · 3 comments · Fixed by #36
Closed

Feature "UI_Xaml" doesn't compile with windows-rs 0.29-git #34

mehmooda opened this issue Dec 29, 2021 · 3 comments · Fixed by #36

Comments

@mehmooda
Copy link

Problem

There seems to be a change in Vtable struct names.

Note: need to use windows-rs git to pass the missing Debug impl error

@BosAurochs
Copy link

Specifically, when using windows-rs version 0.29, I get four different errors related to IVector_abi and IObservableVector_abi.

error[E0412]: cannot find type `IObservableVector_abi` in module `windows::Foundation::Collections`
    --> C:\Users\*\.cargo\git\checkouts\windows-app-rs-2b833a79998cddd6\5438301\src\Microsoft\UI\Xaml\mod.rs:5161:55
     |
5161 |       type Vtable = ::windows::Foundation::Collections::IObservableVector_abi<DependencyObject>;
     |                                                         ^^^^^^^^^^^^^^^^^^^^^ help: a struct with a similar name exists: `IObservableVectorVtbl`
     |
    ::: C:\Users\*\.cargo\registry\src\github.com-1ecc6299db9ec823\windows-0.29.0\src\Windows\Foundation\Collections\mod.rs:1233:1
     |
1233 | / pub struct IObservableVectorVtbl<T>(
1234 | |     pub unsafe extern "system" fn(this: *mut ::core::ffi::c_void, iid: &::windows::core::GUID, interface: *mut *mut ::core::ffi::c_void) ...
1235 | |     pub unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> u32,
1236 | |     pub unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> u32,
...    |
1244 | | where
1245 | |     T: ::windows::core::RuntimeType + 'static;
     | |______________________________________________- similarly named struct `IObservableVectorVtbl` defined here


error[E0412]: cannot find type `IVector_abi` in module `windows::Foundation::Collections`
     --> C:\Users\*\.cargo\git\checkouts\windows-app-rs-2b833a79998cddd6\5438301\src\Microsoft\UI\Xaml\mod.rs:32901:55
      |
32901 |       type Vtable = ::windows::Foundation::Collections::IVector_abi<TriggerAction>;
      |                                                         ^^^^^^^^^^^ help: a struct with a similar name exists: `IVectorVtbl`
      |
     ::: C:\Users\*\.cargo\registry\src\github.com-1ecc6299db9ec823\windows-0.29.0\src\Windows\Foundation\Collections\mod.rs:1676:1
      |
1676  | / pub struct IVectorVtbl<T>(
1677  | |     pub unsafe extern "system" fn(this: *mut ::core::ffi::c_void, iid: &::windows::core::GUID, interface: *mut *mut ::core::ffi::c_void) ...
1678  | |     pub unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> u32,
1679  | |     pub unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> u32,
...     |
1697  | | where
1698  | |     T: ::windows::core::RuntimeType + 'static;
      | |______________________________________________- similarly named struct `IVectorVtbl` defined here

There was also an error relating to the Debug trait. This was a known problem introduced in windows-rs 0.29, and fixed in 0.30. The crate compiles without error when using windows-rs 0.28.

@kennykerr
Copy link
Collaborator

kennykerr commented Feb 24, 2022

This should be fixed once windows-app-rs switches over to the new bindgen crate. @riverar

@riverar
Copy link
Collaborator

riverar commented Feb 25, 2022

Yep, hoping to close all issues here with a new crate update!

@riverar riverar mentioned this issue Feb 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants