-
Notifications
You must be signed in to change notification settings - Fork 272
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
Embed package_dir in InstallPlanAction #1040
Embed package_dir in InstallPlanAction #1040
Conversation
|
||
static ActionPlan create_upgrade_plan(const PortFileProvider& provider, | ||
const CMakeVars::CMakeVarProvider& var_provider, | ||
const std::vector<PackageSpec>& specs, |
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.
I would prefer a function that does std::vector<PackageSpec>
-> View<FullPackageSpec>
to avoid needing to consider multiple conversions at once, but not a huge deal.
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.
I'm not sure what you mean by this. Which multiple conversions are we talking about?
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.
Hmm OK I guess there is only one conversion here; I got tripped up because parameters 0, 1, and 3 are the same, but parameter 2 differs, and I think I read it as parameter 3 being either StatusParagraphs or Triplet.
It is still annoying to need to compare conversions to View<FullPackageSpec>
and const std::vector<PackageSpec>&
, but you have already resolved that problem by renaming the latter so we good.
|
||
static ActionPlan create_upgrade_plan(const PortFileProvider& provider, | ||
const CMakeVars::CMakeVarProvider& var_provider, | ||
const std::vector<PackageSpec>& specs, |
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.
Hmm OK I guess there is only one conversion here; I got tripped up because parameters 0, 1, and 3 are the same, but parameter 2 differs, and I think I read it as parameter 3 being either StatusParagraphs or Triplet.
It is still annoying to need to compare conversions to View<FullPackageSpec>
and const std::vector<PackageSpec>&
, but you have already resolved that problem by renaming the latter so we good.
Resolves microsoft/vcpkg#31908 In microsoft#1040 , create_feature_install_plan and create_versioned_install_plan were fixed, but not create_upgrade_plan. Make this bug structurally impossible by making the FooAction ctors that fill in m_scfl also fill in package_dir.
Resolves microsoft/vcpkg#31908 In #1040 , create_feature_install_plan and create_versioned_install_plan were fixed, but not create_upgrade_plan. Make this bug structurally impossible by making the FooAction ctors that fill in m_scfl also fill in package_dir.
Continued work towards #998.
This PR moves ownership of the package directory into
InstallPlanAction
, which simplifies call patterns and reduces dependency onVcpkgPaths
.