diff --git a/skills/vcpkg/SKILL.md b/skills/vcpkg/SKILL.md index e6909544..cb8a4503 100644 --- a/skills/vcpkg/SKILL.md +++ b/skills/vcpkg/SKILL.md @@ -98,8 +98,8 @@ cmake -B build -DCMAKE_TOOLCHAIN_FILE=/scripts/buildsystems/vcpkg.cm ### Classic-to-Manifest Migration -1. List what's currently installed: `vcpkg list` -2. Create `vcpkg.json` with those dependencies +1. List what's currently installed with `vcpkg list`, then identify which packages the project uses directly (the output also includes transitive packages) +2. Create `vcpkg.json` with only those direct dependencies 3. Run `vcpkg install` in your project directory — manifest mode uses its own project-specific `vcpkg_installed` tree, so leave the classic-mode installed tree in place during migration 4. Update your build system to use `CMAKE_TOOLCHAIN_FILE` if not already 5. Optional: remove classic-mode packages later by name with `vcpkg remove --recurse` if you no longer need them @@ -209,7 +209,7 @@ Use a baseline for the registry that resolves the dependency. For the builtin re - `overrides` take precedence over all version constraints, including transitive ones. - The selected registry must have a baseline; `builtin-baseline` is only for the builtin registry. - Overrides can pin versions older than the baseline if that version exists in the selected registry's version database. -- Use `vcpkg x-history ` to inspect available versions. +- Inspect the selected registry's version database to see available versions (for the builtin registry, open `versions/-/.json` in the vcpkg repository). --- diff --git a/skills/vcpkg/references/troubleshooting.md b/skills/vcpkg/references/troubleshooting.md index 49400e35..a8a531ad 100644 --- a/skills/vcpkg/references/troubleshooting.md +++ b/skills/vcpkg/references/troubleshooting.md @@ -61,10 +61,7 @@ Update the features in `vcpkg.json`: Then run `vcpkg install` — vcpkg will detect the feature change and rebuild. -In classic mode: -```console -vcpkg install curl[ssl,ssh] --recurse # permits rebuilding with the new feature set -``` +In classic mode, installing a feature only adds to the already installed feature set; omitted features are not removed. To remove a feature, uninstall `curl` and then reinstall it with the desired features. Account for dependent packages before using `--recurse`, because it removes them too. ### Replacing One Library with Another @@ -88,8 +85,10 @@ Remove-Item -Recurse -Force \installed # Remove package build artifacts Remove-Item -Recurse -Force \packages -# In manifest mode, remove the local vcpkg_installed directory +# In CLI manifest mode, remove the manifest-root install directory Remove-Item -Recurse -Force .\vcpkg_installed + +# With CMake integration, remove \vcpkg_installed (or VCPKG_INSTALLED_DIR) ``` ```bash @@ -97,5 +96,6 @@ rm -rf /buildtrees rm -rf /downloads rm -rf /installed rm -rf /packages +# CLI manifest mode; with CMake integration, use /vcpkg_installed (or VCPKG_INSTALLED_DIR) rm -rf ./vcpkg_installed ```