vcpkg icon indicating copy to clipboard operation
vcpkg copied to clipboard

`vcpkg install` keeps pretending there's nothing found (from VS2022 Enterprise, manifest mode)

Open christianparpart opened this issue 7 months ago • 6 comments

Describe the bug vcpkg from VS2022 Enterprise started to find no packages anymore on one particular machine. It works on all others, but not here. All my other systems (Windows 11 pro + VS2022 Enterprise as well as Fedora Linux) work just fine. But this machine doesn't anymore. It just stopped. I dropped all "vcpkg" files and directories from my $HOME and also fully reinstalled VS2022 Enterprise, making sure there's no trace of "vcpkg" when trying to look out for them. I even tried a newly created local Windows user, and yet, no luck. I'm giving up now. I've tried googling, and only found old entries, related to a destroyed manifest cache/database. Well, but i've cleaned it all, I thought? What else should I delete that I did not find just yet.

Environment

  • OS: Windows 11 Pro
  • Compiler: MSVC VS 2022 Enterprise

To Reproduce

  1. git clone your thing having a vcpkg.json
  2. vcpkg install

Expected behavior vcpkg install to just work as it does on all my other machines.

Failure logs

`vcpkg install --debug`

 Lightweight  vcpkg install --debug
[DEBUG] To include the environment variables in debug output, pass --debug-env
[DEBUG] Trying to load bundleconfig from C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\vcpkg\vcpkg-bundle.json
[DEBUG] Bundle config: readonly=true, usegitregistry=true, embeddedsha=4f8fe05871555c1798dbcb1957d0d595e94f7b57, deployment=VisualStudio, vsversion=17.0
[DEBUG] VS telemetry opted in at SOFTWARE\WOW6432Node\Microsoft\VSCommon\17.0\SQM\\OptIn
[DEBUG] Metrics enabled.
[DEBUG] Feature flag 'binarycaching' unset
[DEBUG] Feature flag 'compilertracking' unset
[DEBUG] Feature flag 'registries' unset
[DEBUG] Feature flag 'versions' unset
[DEBUG] Feature flag 'dependencygraph' unset
[DEBUG] Using scripts-root: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\vcpkg\scripts
[DEBUG] Using builtin-ports: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\vcpkg\ports
[DEBUG] Using installed-root: D:\Lightweight\vcpkg_installed
[DEBUG] Using buildtrees-root: D:\Lightweight\vcpkg_installed\vcpkg\blds
[DEBUG] Using packages-root: D:\Lightweight\vcpkg_installed\vcpkg\pkgs
[DEBUG] Using manifest-root: D:\Lightweight
[DEBUG] Using vcpkg-root: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\vcpkg
[DEBUG] Using builtin-registry: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\vcpkg\versions
[DEBUG] Using downloads-root: C:\Users\chris\AppData\Local\vcpkg\downloads
[DEBUG] Detecting host with IsWow64Process2
[DEBUG] Detecting host with IsWow64Process2
[DEBUG] Detecting host with IsWow64Process2
[DEBUG] Found path: C:\Program Files\Git\cmd\git.exe
[DEBUG] 1000: CreateProcessW("C:\Program Files\Git\cmd\git.exe" --version)
[DEBUG] 1000: cmd_execute_and_stream_data() returned 0 after    25333 us
[DEBUG] 1001: CreateProcessW("C:\Program Files\Git\cmd\git.exe" "--git-dir=C:\Users\chris\AppData\Local\vcpkg\registries\git\.git" "--work-tree=C:\Users\chris\AppData\Local\vcpkg\registries\git" -c core.autocrlf=false show 000d1bda1ffa95a73e0b40334fa4103d6f4d3d48:versions/baseline.json)
[DEBUG] 1001: cmd_execute_and_stream_data() returned 128 after    26194 us
[DEBUG] Failed to open: D:\Lightweight\vcpkg_installed\vcpkg\vcpkg-lock.json
[DEBUG] Failed to load lockfile: no such file or directory
Fetching registry information from https://github.com/microsoft/vcpkg (HEAD)...
[DEBUG] 1002: CreateProcessW("C:\Program Files\Git\cmd\git.exe" "--git-dir=C:\Users\chris\AppData\Local\vcpkg\registries\git\.git" "--work-tree=C:\Users\chris\AppData\Local\vcpkg\registries\git" -c core.autocrlf=false init)
[DEBUG] 1002: cmd_execute_and_stream_data() returned 0 after    42291 us
[DEBUG] 1003: CreateProcessW("C:\Program Files\Git\cmd\git.exe" "--git-dir=C:\Users\chris\AppData\Local\vcpkg\registries\git\.git" "--work-tree=C:\Users\chris\AppData\Local\vcpkg\registries\git" -c core.autocrlf=false fetch --update-shallow -- https://github.com/microsoft/vcpkg HEAD)
[DEBUG] 1003: cmd_execute_and_stream_data() returned 0 after  9145108 us
[DEBUG] 1004: CreateProcessW("C:\Program Files\Git\cmd\git.exe" "--git-dir=C:\Users\chris\AppData\Local\vcpkg\registries\git\.git" "--work-tree=C:\Users\chris\AppData\Local\vcpkg\registries\git" -c core.autocrlf=false rev-parse FETCH_HEAD)
[DEBUG] 1004: cmd_execute_and_stream_data() returned 0 after    29950 us
[DEBUG] 1005: CreateProcessW("C:\Program Files\Git\cmd\git.exe" "--git-dir=C:\Users\chris\AppData\Local\vcpkg\registries\git\.git" "--work-tree=C:\Users\chris\AppData\Local\vcpkg\registries\git" -c core.autocrlf=false show 000d1bda1ffa95a73e0b40334fa4103d6f4d3d48:versions/baseline.json)
[DEBUG] 1005: cmd_execute_and_stream_data() returned 0 after    33627 us
[DEBUG] 1006: CreateProcessW("C:\Program Files\Git\cmd\git.exe" "--git-dir=C:\Users\chris\AppData\Local\vcpkg\registries\git\.git" "--work-tree=C:\Users\chris\AppData\Local\vcpkg\registries\git" -c core.autocrlf=false rev-parse a9eee3b18df395dbb8be71a31bd78ea441056e42:versions)
[DEBUG] 1006: cmd_execute_and_stream_data() returned 0 after    28520 us
[DEBUG] 1007: CreateProcessW("C:\Program Files\Git\cmd\git.exe" --git-dir "C:\Users\chris\AppData\Local\vcpkg\registries\git\.git" -c core.autocrlf=false read-tree 7b8e5ee887c5a210ab5ecd21245b816cf2e8aff0)
[DEBUG] 1007: cmd_execute_and_stream_data() returned 0 after    39216 us
[DEBUG] 1008: CreateProcessW("C:\Program Files\Git\cmd\git.exe" --git-dir "C:\Users\chris\AppData\Local\vcpkg\registries\git\.git" -c core.autocrlf=false --work-tree C:/Users/chris/AppData/Local/vcpkg/registries/git-trees/7b8e5ee887c5a210ab5ecd21245b816cf2e8aff0_4468.tmp checkout-index -af --ignore-skip-worktree-bits --prefix=C:/Users/chris/AppData/Local/vcpkg/registries/git-trees/7b8e5ee887c5a210ab5ecd21245b816cf2e8aff0_4468.tmp/)
[DEBUG] 1008: cmd_execute_and_stream_data() returned 129 after    27113 us
catch2 does not exist
yaml-cpp does not exist
[DEBUG] D:\a\_work\1\s\src\vcpkg\commands.install.cpp(1262):
[DEBUG] Time in subprocesses: 10243713us
[DEBUG] Time in parsing JSON: 52926us
[DEBUG] Time in JSON reader: 1715us
[DEBUG] Time in filesystem: 3699us
[DEBUG] Time in loading ports: 0us
[DEBUG] Exiting after 10 s (9469162us)
 Lightweight  cat .\vcpkg.json
{
  "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
  "dependencies": [
    { "name": "yaml-cpp", "version>=": "0.8.0" },
    { "name": "catch2", "version>=": "3.5.2" }
  ]
}

Additional context given on top already, apart from not saying yet, that I'm actually 😠 mad. :)

christianparpart avatar May 31 '25 11:05 christianparpart

Solution was to update Git installation.

This is non-obvious. Not at all, How on earth would one know, even when looking at the above debug log.

PLEASE update the diagnostics to be printed to the user, such that future users won't suffer biting into the wooden desk and loosing teeth, because MS products give a classic non-diagnostic non-helpful message.

Going from "package x-y not found" to "Unsupported Git version, please update." is huge. :)

christianparpart avatar May 31 '25 15:05 christianparpart

Do you know which Git version you have used?

autoantwort avatar Jun 02 '25 22:06 autoantwort

@autoantwort no, sadly too late, but maybe i'll still have the screen open. I was tracing each command individually (the git command, I've executed myself from the log) and realized that the last one broke due to an unrecognized command line argument, i can figure that out again).

christianparpart avatar Jun 04 '25 06:06 christianparpart

I know that at least --ignore-skip-worktree-bits was unregognized.

Sory to day, @Cheney-W, but the tag category:question is anything but definitely wrong! This is not a question. This is a problem in how vcpkg deals with git. It simply expects CLI args to be present and yes beyond bad communication skills to the user on how to deal with errors and zero will to help with diagnostics, to aid the user to understand the error. The error the user receives is 100% misleading.

So my suggestion is, that it's probably best to improve error handling and give the user a little more than a vague "package not found" message. The problem was way earlier: Running git failed because of "place stderr here". This would have helped the user instantly. Keep in mind, the users, using vcpkg, most likely can deal with these kind of errors. And those who can't, would not be further distracted then already.

christianparpart avatar Jun 06 '25 19:06 christianparpart

I know that at least --ignore-skip-worktree-bits was unregognized.

Than it is a duplicate of https://github.com/microsoft/vcpkg/issues/44803 and already fixed in https://github.com/microsoft/vcpkg-tool/pull/1638

autoantwort avatar Jun 07 '25 01:06 autoantwort

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

github-actions[bot] avatar Dec 06 '25 02:12 github-actions[bot]