vcpkg icon indicating copy to clipboard operation
vcpkg copied to clipboard

RFE: Print the build log(s) on package build failure

Open MarkCallow opened this issue 6 months ago • 3 comments

When a package build fails vcpkg tells you to look at a log file whose location is printed. This is unfriendly/annoying/infuriating when it happens during a CI run, depending on how easy it is to edit the workflow to dump the log and rerun the CI, how long it takes to get to the point of failure and whether you first need to learn how to get a step to run after a build failure.

Please print the relevant logs after a build failure. You could hide this behind an option if you like, see ctest's --output-on-failure. If so, it must be possible to set this option even when not directly invoking vcpkg, as happens when using manifest mode in a CMake build.

MarkCallow avatar Jun 12 '25 06:06 MarkCallow

It already does that for common ci's (https://github.com/microsoft/vcpkg-tool/blob/734ea2bccce8981eff45308cdf5a811790b576b3/src/vcpkg/commands.build.cpp#L1978) Which ci are you using?

autoantwort avatar Jun 15 '25 12:06 autoantwort

Which ci are you using?

GitHub Actions. In the case where I modified the CI to print the log of the failing build, I was using an Ubuntu runner.

MarkCallow avatar Jun 16 '25 00:06 MarkCallow

So if you are using the latest vcpkg version the log should already be there.

autoantwort avatar Jun 16 '25 01:06 autoantwort