azure-sdk-for-c icon indicating copy to clipboard operation
azure-sdk-for-c copied to clipboard

Remove vcpkg.ps1 and evaluate removal of vcpkg-commit.txt after updating its usage in docs

Open ahsonkhan opened this issue 2 years ago • 2 comments

There are no users of the vcpkg.ps1 script: https://github.com/Azure/azure-sdk-for-c/blob/070162c68ccd2f93e1d8932b8e99a8c33e6ce6d9/eng/scripts/vcpkg.ps1#L1

Furthermore, other than the getting started docs, no one is referencing vcpkg-commit.txt. It is useful to keep to make documenting easier and having a single place to update the baseline we point to. We should make use of that in the AzureVcpkg.cmake module and vcpkg.json file (for the baseline), OR remove it. https://github.com/Azure/azure-sdk-for-c/blob/070162c68ccd2f93e1d8932b8e99a8c33e6ce6d9/eng/vcpkg-commit.txt#L1 https://github.com/Azure/azure-sdk-for-c/blob/2e375c04b00c36c9b024afbcd405d348732b1142/sdk/samples/iot/README.md#prerequisites

https://github.com/Azure/azure-sdk-for-c/blob/070162c68ccd2f93e1d8932b8e99a8c33e6ce6d9/cmake-modules/AzureVcpkg.cmake#L24 https://github.com/Azure/azure-sdk-for-c/blob/070162c68ccd2f93e1d8932b8e99a8c33e6ce6d9/vcpkg.json#L4

cc @vhvb1989, @danieljurek, @BillyONeal, @danewalton

ahsonkhan avatar Nov 08 '22 23:11 ahsonkhan

We should ideally use this string in one place. Having it in a single text file makes it easier to read for users and automation (as opposed to extracting it from a cmake file). I vote we have the cmake script read it from a file if it's easy enough to do.

danieljurek avatar Nov 10 '22 15:11 danieljurek

Reading it from a file within cmake is doable (https://cmake.org/cmake/help/latest/command/file.html), but the issue is with updating that same string within the "builtin-baseline" property within the vcpkg.json file.

As an aside, the C++ SDK repo doesn't have the vcpkg-commit.txt file, how does it extract the SHA to check-out?

ahsonkhan avatar Nov 10 '22 16:11 ahsonkhan