-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[VCPKG] Using [core] in Build-Depends does not work #11602
Comments
Maybe the same reason with #11519. |
That is intended behavior/design decession assume port A,B and port A having features X,Y,Z. (X,Y defaulted) If B Build-Depends on A[core] it means that B requires A[core]. but the user might want to use A and B together with it's default. Instead of having the user type |
@Neumann-A According to documentation, the behavior of the installation port should be consistent with the behavior of the dependency installation. |
@JackBoosY That behavior is not documented.
lets assume:
From a user experience I personally prefer 1. while I understand why 2. would also be desirable. I like 1. because I don't need to care about explicitly listing all default features I would want for a dependent port. Furthermore the control files of most ports are probably wrong and should always list Currently: Required new meaning according to accomplish 2. without updating all So the problem lies probably in the listing in the Control files. |
Not so sure about that. |
The way it has been described to me in the past is that if However, in addition to the above, a decision was made to add an implicit dependency on the default features of all dependencies, unless that dependency is already installed or if in the command line you specify that you really only want the i.e. From a clean
|
So, to be clear, I don't consider the described behavior to be a bug, though I'm not a fan of it. |
There is (let me say) incoherence between command line interface and “CONTROL” interface. It is really a source of confusion, and I would have been really sure I was right about the intentions, before your comment... |
Per @ras0219-msft
|
Short
In build-depends of port
In
In
In
The issue raised here is saying that the following should be changed:
Since the user only said |
If:
Expect behavor is:
|
@JackBoosY the entire above conversation suggests what you are seeing is by design not a bug. |
@cbezault But now, if I install |
Exactly. They say it’s a design choice. I say it’s a strange one, but ok |
It's not the same. If you wrote |
So for your original issue. If you write |
Yes I understood. The problem for me is just that you are not supposed to know dependencies of your dependencies. And I was expecting vcpkg to install the minimum required for me, especially if the portfile is taking extra care of saying that it does not require anything more than the core version of another library... |
I think the behaviour should be consistent when we use port[core], either we only install port[core] or depend on port[core]. eg: the dmlc default feature openmp shouldn't be installed since we specified to depend on dmlc[core]. it should be same with installing dmlc[core] only.
|
@cbezault @Neumann-A I still think that's a bug, because if you use the keyword |
Another example is
|
@linquize because the correct syntax is vcpkg install |
How can I completely skip openssl if I choose mbedtls?
|
@ras0219 indicates that this is intentional behavior to reduce the likelihood of needing to rebuild the world if someone adds dependencies incrementally; to make vcpkg work more like "apt" and friends. That doesn't preclude adding an option Also note that @strega-nil 's "manifest mode" should probably imply this |
else if (request_type != RequestType::USER_REQUESTED)
{
// If the user did not explicitly request this installation, we need to add all new default features
auto&& new_defaults = get_scfl_or_exit().source_control_file->core_paragraph->default_features;
std::set<std::string> defaults_set{new_defaults.begin(), new_defaults.end()};
// Install only features that were not previously available
if (auto p_inst = m_installed.get())
{
for (auto&& prev_default : p_inst->ipv.core->package.default_features)
{
defaults_set.erase(prev_default);
}
}
for (const std::string& feature : defaults_set)
{
// Instead of dealing with adding default features to each of our dependencies right
// away we just defer to the next pass of the loop.
out_reinstall_requirements.emplace_back(m_spec, feature);
} Automaticly set all the default features. And for RequestType request_type = RequestType::AUTO_SELECTED; |
I'm closing this issue because all behaviors described in this thread are by design. Please see the discussion above about the rationale. If anyone feels that there is a not-by-design behavior given the explanation above (especially [1]), please open a new issue. [1] #11602 (comment) |
Describe the bug
When port A has default feature and port B depends on A[core], the default feature of port A will still be activated.
Environment
To Reproduce
Steps to reproduce the behavior:
Build-Depends: dmlc
toBuild-Depends: dmlc[core]
Repro code when
Expected behavior
Any build that relies on other ports[core] should only build the port itself without any features.
Failure logs
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: