Fix overpowered default-features = false specification in manifest mode#292
Conversation
f146903 to
876912c
Compare
Co-authored-by: Billy O'Neal <bion@microsoft.com>
|
I liked the other default (you don't depend on default features by default) more :) |
|
This didn't do that -- this was just straight-up a bug. You still depended on default-features if you didn't explicitly disable them, but if you did remove the dependency from top-level it would delete the dependency down your entire transitive tree (even for packages that do depend on them). I am aware of your preference here that's shared by many users and I intend to propose a solution soon. |
|
Previously not. Previously it only depended on PS: Sorry for the wrong new example output, I corrected it now |
That's what vcpkg returned before, but that's not what that manifest says. A dependency without default-features: false means it depends on the default features. Returning otherwise would be like saying "if you pass this switch we will make 2+2 == 5". |
That depends how you interpret the manifest file :)
Imho that's not cleanly specified in the specification. If the vcpkg-tool was the specification it was the other way around and until a month ago I thought it was the intended behavior. But I do not really want to argue against you. I only said that I liked the previous behavior more. And I don't see why changing the default from |
The dependencies here don't know anything about manifest mode. If you want to change something about the outermost manifest under the person's control throwing the extra switch, that's one thing, but that's not what's going on here. |
|
Let me clarify: a simple string in a dependency list has always meant "with defaults" (that's why there's a And then we actually install I am working on a feature that adds two things:
With this feature (let's call it See #295. |

Currently, there is a bug in manifest mode where if the top level manifest marks a package as
"default-features": false, all downstream dependencies upon defaults on that package will be ignored. For example,toplevel -> A, B[core]
A -> B (including defaults)
Expected result: A, B[1,2,3,...]
Current result: A, B[core]
This PR fixes that issue to achieve the expected result.