You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apologies if the problem is filed before. I scanned through the issues and found a whole lot of similar but not quite exactly that. Please feel free to close as a dupe if I missed it.
Problem
Consider the following configuration of an optional dependency "bar":
Now, suppose we are doing cargo check --features "foo".
Expected result: project builds without "bar" enabled
Actual result: project builds with "bar" enabled
We have quite a few dependencies that have this optional feature "winit". We want to be able to build it as: cargo build --features window-winit,gfx-backend-dx12, expecting that the DX12 backend is enabled, and it has the "winit" feature enabled.
What happens instead is that every optional dependency listed in "window-winit" gets enabled.
Is this by design? Is there a way to express what we want through the config?
Notes
This is a very annoying issue in gfx-rs ecosystem. It affects Amethyst, wgpu-rs and potentially other projects that want certain properties (such as "winit" or "serde" dependencies) of the backends to be configurable.
Obviously this workaround does not scale to your use case.
It would be a breaking change if now suddenly "foo" = ["bar/foo"] would mean that bar is not enabled. So I guess new syntax has to be introduced. Strawman proposal: "foo" = ["?bar/foo"].
Apologies if the problem is filed before. I scanned through the issues and found a whole lot of similar but not quite exactly that. Please feel free to close as a dupe if I missed it.
Problem
Consider the following configuration of an optional dependency "bar":
Now, suppose we are doing
cargo check --features "foo"
.Expected result: project builds without "bar" enabled
Actual result: project builds with "bar" enabled
Here is a more concrete example from gfx-rs/wgpu#290:
We have quite a few dependencies that have this optional feature "winit". We want to be able to build it as:
cargo build --features window-winit,gfx-backend-dx12
, expecting that the DX12 backend is enabled, and it has the "winit" feature enabled.What happens instead is that every optional dependency listed in "window-winit" gets enabled.
Is this by design? Is there a way to express what we want through the config?
Notes
This is a very annoying issue in gfx-rs ecosystem. It affects Amethyst, wgpu-rs and potentially other projects that want certain properties (such as "winit" or "serde" dependencies) of the backends to be configurable.
Output of
cargo version
:The text was updated successfully, but these errors were encountered: