microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.43k stars 6.2k forks source link

[vcpkg-artifact] 'cmake' matched more than one result #39157

Open FrankXie05 opened 1 month ago

FrankXie05 commented 1 month ago

Operating system

Windows

Compiler

MSVC

Steps to reproduce the behavior

iex (iwr -useb https://aka.ms/vcpkg-init.ps1) 
cd .\.vcpkg\
.\vcpkg.exe find artifact cmake
.\vcpkg.exe use cmake

Failure logs

PS C:\Users\test\.vcpkg> .\vcpkg.exe use cmake
warning: vcpkg-artifacts is experimental and may change at any time.
error: AssertionError [ERR_ASSERTION]: 'cmake' matched more than one result (microsoft:tools/kitware/cmake,arm:tools/kitware/cmake).

Additional context

It seems that ce downloads two different versions of cmake from different places and looks for them, and ignores the local cmake. @vicroms @BillyONeal

6dda6f02-a51a-4ba9-9614-9da3f84130ed f76e0382-f360-4a60-b77a-23c29958b82e 653dfa2e-67b8-4ea2-b366-be8360637786

FrankXie05 commented 1 month ago

@102030w

BillyONeal commented 1 month ago

This is expected, now that ARM has decided to add an artifact named cmake to their repo. It needs to be explicitly qualified microsoft:cmake if you want the previous behavior.

102030w commented 1 month ago

I need to be explicitly qualified microsoft:cmake. What should I do? eg:

./vcpkg.exe use microsoft:cmake