Skip to content

Removal of a vcpkg port fails manifest configuration when using builtin-baseline after removal commit. #45778

@reitowo

Description

@reitowo

Describe the bug

When use vcpkg manifest mode with builtin-baseline, if set to a revision later than a dependency was removed, the CMake configuration fails without a clear message describing why (the port is removed)

Environment

  • OS: Windows 11

To Reproduce

  1. Using a old version of builtin-baseline, use websocketpp without problem, then trying to update to latest vcpkg revision.

  2. Set baseline to the revision, in this case, websocketpp is removed at [boost] update to 1.87.0 #42678, which is 566f9496b7e00ee0cc00aca0ab90493d122d148a (In fact any revision later than this will reproduce). Keep the removed dependency.

{
  "name": "wspp-repro",
  "version": "1.0.0",
  "dependencies": [
    "websocketpp"
  ],
  "builtin-baseline": "566f9496b7e00ee0cc00aca0ab90493d122d148a"
}
  1. The CMake configuration failed without a clear error message (e.g. the port is removed, the port is not found)
-- Running vcpkg install
error: "C:\Program Files\Git\bin\git.exe" --git-dir "E:\vcpkg\.git" -c core.autocrlf=false read-tree 4cca0dda87286e4d7f84ece919a4a60de04252e3 failed with exit code 128
fatal: failed to unpack tree object 4cca0dda87286e4d7f84ece919a4a60de04252e3
note: while checking out port websocketpp with git tree 4cca0dda87286e4d7f84ece919a4a60de04252e3
note: See https://learn.microsoft.com/vcpkg/users/versioning-troubleshooting?WT.mc_id=vcpkg_inproduct_cli for more information.
note: while loading websocketpp@0.8.2#4

-- Running vcpkg install - failed
CMake Error at E:/vcpkg/scripts/buildsystems/vcpkg.cmake:938 (message):
  vcpkg install failed.  See logs for more information:
  E:\wspp-repro\cmake-build-debug\vcpkg-manifest-install.log
Call Stack (most recent call first):
  C:/Users/reito/AppData/Local/Programs/CLion/bin/cmake/win/x64/share/cmake-3.31/Modules/CMakeDetermineSystem.cmake:146 (include)
  CMakeLists.txt:2 (project)


CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

The linked document also doesn't have this reason listed.

  1. As you can see, in versions/w-/websocketpp.json, the 0.8.2#4 points to a git-tree that doesn't exist.
"versions": [
  {
    "git-tree": "4cca0dda87286e4d7f84ece919a4a60de04252e3",
    "version": "0.8.2",
    "port-version": 4
  },
  {
    "git-tree": "eb46cff6f9a23caefbc56ac8089d1fbee523e13e",
    "version": "0.8.2",
    "port-version": 3
  },
]

Expected behavior

  1. A clear message saying the port is removed, better than that, providing PR or commit of removal). Instead of this unclear git error.
  2. Is it valid for a removed port increase a port-version instead of some other flag indicating a removal?

Metadata

Metadata

Assignees

Labels

category:vcpkg-bugThe issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions