Skip to content

[vcpkg] Warn on unmatched removal with reasonable alternative#11083

Merged
ras0219-msft merged 1 commit intomicrosoft:masterfrom
ras0219-msft:dev/roschuma/warn-on-remove
Apr 30, 2020
Merged

[vcpkg] Warn on unmatched removal with reasonable alternative#11083
ras0219-msft merged 1 commit intomicrosoft:masterfrom
ras0219-msft:dev/roschuma/warn-on-remove

Conversation

@ras0219-msft
Copy link
Contributor

This PR causes vcpkg to warn if the user attempts to remove a package that is not installed, but has the same port installed in a different triplet.

Before:

> ./vcpkg remove zlib:x64-windows --dry-run
The following packages are not installed, so not removed:
    zlib:x64-windows

> ./vcpkg remove zlib:x86-windows --dry-run
The following packages will be removed:
  * cpprestsdk:x86-windows
    zlib:x86-windows
Additional packages (*) need to be removed to complete this operation.
If you are sure you want to remove them, run the command with the --recurse option

After:

> .\toolsrc\out\build\x64-Release\vcpkg remove zlib:x64-windows --dry-run
The following packages are not installed, so not removed:
    zlib:x64-windows
Another installed package matches the name of an unmatched request. Did you mean zlib:x86-windows?
Another installed package matches the name of an unmatched request. Did you mean zlib:arm64-windows?
Another installed package matches the name of an unmatched request. Did you mean zlib:x64-uwp?

> .\toolsrc\out\build\x64-Release\vcpkg remove zlib:x86-windows --dry-run
The following packages will be removed:
  * cpprestsdk:x86-windows
    zlib:x86-windows
Additional packages (*) need to be removed to complete this operation.
If you are sure you want to remove them, run the command with the --recurse option

Additionally, I have deprecated the (relatively) undocumented "purge" feature and removed extraneous messages to reduce noise.

Yes

@ras0219-msft ras0219-msft self-assigned this Apr 29, 2020
@ras0219-msft ras0219-msft merged commit 3ae3bd3 into microsoft:master Apr 30, 2020
strega-nil pushed a commit to strega-nil/vcpkg that referenced this pull request May 5, 2021
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