Skip to content

Conversation

@BillyONeal
Copy link
Member

This is some cleanup I did while trying to better understand how the dependency planner works trying to fix microsoft/vcpkg#48797 (comment) et al.

  • Fixes curl tests to work on more recent versions of curl which use 'Could not' over 'Couldn't' in more places
  • Adds an 'unskipped-cascade' input to ci.ps1 tests.
  • Fixes Law-of-Demeter problem in CMakeVarProvider::load_tag_vars which wanted a whole ActionPlan despite only needing the install actions
  • Adds PackageSpec to ExtendedBuildResult to avoid cases where reporters were trying to re-parse the SourceControlFile et al. to figure out the package name
  • Split InstallSpecSummary from SpecSummary to avoid value_or_exits when reporting about install actions. (Those values were only empty for removals which continue to use SpecSummary)
  • Split InstallPlanAction into AlreadyInstalledPlanAction and InstallPlanAction, where the former has the InstalledPackageView for already installed things, and the latter has the SourceControlFileAndLocation for to-be-installed things. This avoids a lot of optionality in the rest of the product needing to deal with these two cases, particularly in parts that only ever cared about to-be-installed parts.
  • Improve reporting of dependency constraint violations by reporting them as DiagnosticLine rather than LocalizedString (fixes the print color of those)
  • In create_binary_control_file, loop through the feature_dependencies directly rather than trying to look each of them up by name. Note that feature_list is feature_dependencies projected to only the names.
  • In commands.depend-info.cpp, don't form a vector of pointers when the real vector will do. Note that it calls create_feature_install_plan with an empty/blank status_db, so already_installed is known to be empty.
  • Change perform_install_plan_action to record build time directly rather than trying to write during destructors. (This seems easier to reason about to me than the relatively non-local behavior of TrackedPackageInstallGuard, which has been deleted)

Other observations:

  • ExtendedBuildResult has grown to become effectively the XxxSummary types and it is likely that it should be deleted in favor of those directly entirely.
  • I was considering splitting InstallPlanAction again for the "pre-Build::compute_all_abis" and "post-Build::compute_all_abis" state. I'm not sure if that's a good change anymore though because unknown ABIs are a "normal" state of affairs, e.g. when --editable is used. I think that makes all callers of package_abi_or_empty or package_abi_or_exit suspect and those probably need to be fixed, but this PR is big enough.

dg0yt and others added 30 commits November 30, 2025 19:09
Broken:

```
PS C:\Dev\test> C:\Dev\vcpkg-tool\out\build\Win-x64-Debug-WithArtifacts\vcpkg.exe --vcpkg-root C:\Dev\vcpkg install
warning: configuration contains the following unrecognized fields:

$.overridesIf these are documented fields that should be recognized try updating the vcpkg tool.
Detecting compiler hash for triplet x64-windows...
```

Fixed:

```
PS C:\Dev\test> C:\Dev\vcpkg-tool\out\build\Win-x64-Debug-WithArtifacts\vcpkg.exe --vcpkg-root C:\Dev\vcpkg install
warning: configuration contains the following unrecognized fields:
$.overrides
If these are documented fields that should be recognized try updating the vcpkg tool.
Detecting compiler hash for triplet x64-windows...
```
Undoes microsoft/vcpkg#7305 ; we have no tests, documentation, or usage of this as far as I can tell. There were very few callers of public_abi().

With that, none of the 'ActionType' enums are necessary any longer as they are inferable from something else.
…clude-deep

# Conflicts:
#	azure-pipelines/e2e-assets/ci-skipped-ports/baseline.fail.txt
#	azure-pipelines/e2e-assets/ci-skipped-ports/baseline.skip.txt
#	azure-pipelines/end-to-end-tests-dir/ci.ps1
#	include/vcpkg/dependencies.h
#	include/vcpkg/fwd/dependencies.h
#	src/vcpkg-test/dependencies.cpp
#	src/vcpkg-test/plan.cpp
#	src/vcpkg/cmakevars.cpp
#	src/vcpkg/commands.ci.cpp
#	src/vcpkg/commands.install.cpp
#	src/vcpkg/commands.set-installed.cpp
#	src/vcpkg/commands.test-features.cpp
#	src/vcpkg/dependencies.cpp
# Conflicts:
#	include/vcpkg/dependencies.h
#	src/vcpkg-test/plan.cpp
#	src/vcpkg/commands.ci.cpp
#	src/vcpkg/commands.install.cpp
#	src/vcpkg/commands.set-installed.cpp
#	src/vcpkg/dependencies.cpp
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.

2 participants