-
Notifications
You must be signed in to change notification settings - Fork 62
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
Do no include windows apis #58
Comments
I have the same issue when using |
It seems that the dependencies produced by |
I had a try at this, and it is trickier than I expected. I thought I could use cargo::ops::resolve_ws_with_opts and use the I had a look at how |
The best option would be to expose this in |
In #766 / #767, a windows feature flag was added to solve an issue with the way that Yocto package generation was working. This is not actually a problem with Crossterm, but with the Yocto package generation tooling which adds all the dependencies for all features, even if they are not relevant to the target platform. This is a bug in the Yocto / meta-rust / bitbake tooling and not in Crossterm. For more information, see <meta-rust/cargo-bitbake#58>. The fix for this on the Yocto side is to remove dependencies that are conditional on windows. This commit removes the windows feature flag as it's not needed. This is a breaking change for any apps which were specifically using the windows feature flag. If you were using this feature flag, you will need to update your Cargo.toml to remove it. The necessary dependencies are still included in the Cargo.toml file, so you should not need to make any other changes.
I am trying to generate a bitbake recipe without any windows dependencies.
The application I am building depends on log4rs, which depends on the winapi crate. However, this dependency is only enabled when building for windows systems as it is placed in the
[target.'cfg(windows)'.dependencies]
section in the log4rs Cargo.toml. Thus, I would expect that these dependencies are not included in the generated bitbake recipe. When checking the dependency tree withcargo tree
these dependencies are not included, as my currently configured default toolchain isstable-x86_64-unknown-linux-gnu
and I have to explicitly ask for a windows target usingcargo tree --target x86_64-uwp-windows-gnu
to see the windows dependencies in the graph. Moving all dependencies into a[target.'cfg(linux)'.dependencies]
does no fix this issues.Why are windows dependencies included at all in the bitbake recipes, as "The Yocto Project (YP) is an open source collaboration project that helps developers create custom Linux-based systems regardless of the hardware architecture."
Removing the windows dependencies from the generated bitbake recipe works perfectly fine, however there might be dependencies which are not that easy to identify as windows dependencies.
Is there a quick fix for this issue and is this considered expected behavior?
Thanks.
The text was updated successfully, but these errors were encountered: