-
Notifications
You must be signed in to change notification settings - Fork 338
Test/fix internal dependencies in top level manifest. #1890
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
base: main
Are you sure you want to change the base?
Conversation
| if (it != m_graph.end()) | ||
| { | ||
| it->second.origins.insert(origin); | ||
| it->second.default_features &= default_features_mask; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reverts a change from #1331 and is the fix for the livelock: Do not reset default_features to false.
- The toplevel request (
ConstraintFrame) could include multiple dependencies pointing to the toplevel manifest's default features. resolve_stack()callsrequire_port_defaults()for each of these dependencies.- The
default_featuresflag of the solution data node (it->second) is what prevents the creation of multiple newresolve_stackitems (ConstraintFrame).
| it->second.default_features = default_features_mask; | ||
| // Implicit defaults are disabled if spec is requested from top-level spec. | ||
| // Note that if top-level doesn't also mark that reference as `[core]`, defaults will be re-engaged. | ||
| it->second.default_features = origin != m_toplevel.name(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a revert but retains the actual fix from #1331: Fixing the initialization of the flag.
There are three places which engage the actual default features:
- For the input to the
vcpkg installcommand, default features are initialy unrolled incommands.install.cpp, subject to command line switch. - For dependencies requested from the toplevel manifest (name), the value is
false. Actual default features can be engaged byrequire_port_defaults(), subject to explicit dependencies in theresolve_stackitems (ConstraintFrame). - For dependencies requested from other manifests, , the value is
true. The actual default features are engaged byrequire_scfl()called three lines later.
|
Now it should be the right fix, rectifying changes from #1331. I removed cleanup and optimization from this PR. I would submit these usefull improvements after this PR. In addition, I think that |
Fixes microsoft/vcpkg#48892.
Implements microsoft/vcpkg#48892 (comment)
This seems to be the first test that actually covers details of handling the top-level manifest, i.e. the request is installing the given top level manifest, not unrelated ports from the registry.
Edit: The difference is how the "source control file" is passed to
create_versioned_install_plan.The PR now includes the e2e test from #1889 because it helps to understand the construction of the test in
dependencies.cpp.