Skip to content
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

Merged
merged 7 commits into from
May 1, 2023

Conversation

ras0219-msft
Copy link
Contributor

Continued work towards #998.

This PR moves ownership of the package directory into InstallPlanAction, which simplifies call patterns and reduces dependency on VcpkgPaths.


static ActionPlan create_upgrade_plan(const PortFileProvider& provider,
const CMakeVars::CMakeVarProvider& var_provider,
const std::vector<PackageSpec>& specs,
Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Member

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,
Copy link
Member

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.

@ras0219-msft ras0219-msft merged commit 57808ea into microsoft:main May 1, 2023
@ras0219-msft ras0219-msft deleted the dev/roschuma/packagedir branch May 1, 2023 16:50
BillyONeal added a commit to BillyONeal/vcpkg-tool that referenced this pull request Jun 20, 2023
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.
BillyONeal added a commit that referenced this pull request Jun 22, 2023
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants