Closed 0xlane closed 2 years ago
I'm a rust beginner. This rust error has puzzled me for a long time. It took me a long time to know that it was caused by inconsistent dependence versions.
Hello, thanks for reporting.
Yes, using types from incompatible crate version results in errors that are sometimes hard to understand, as the compiler errors are not always very explicit.
In this case, instead of your version of GUID
, your code should use our version of GUID
, which is guaranteed to be the right version,
e.g.
let guid: ferrisetw::GUID = TryParse::...
But...we forgot to re-export GUID
it in ferrisetw, so that's currently impossible.
The linked PR should resolve this issue. You can either use it as soon as now using an override in your cargo.toml, pointing the ferrisetw dep to https://github.com/daladim/ferrisetw/tree/re_exporting_windows_rs_types, or wait for us to publish the next minor release that will include this fix.
(also, note that we're working on the next major release as well, that you may want to have a look at: https://github.com/n4r1b/ferrisetw/tree/next_major_version)
windows-rs version in ferrisetw's Cargo.toml is 0.39, but windows-rs version in my project is 0.42. This will cause the following error when compiling:
My project can only be compiled by using windows-rs with the same version as ferrisetw.
Is there any good solution?