vcpkg icon indicating copy to clipboard operation
vcpkg copied to clipboard

[scripts|world rebuild] Disambiguate saved log files

Open dg0yt opened this issue 2 years ago • 2 comments

  • What does your PR fix?

    Complements #25189: vcpkg saves named log files to the buildtrees dir, e.g. to collect them as CI failure logs. However, with parallel CMake config mode, both release and debug variant of CMakeCache.txt share the same log prefix, so they end up in the same saved filepath. This PR ensures that a suffix is added as needed to disambiguate such cases.

    Example of the bug: #26832

    See logs for more information:
    D:\...\buildtrees\openblas\config-x64-windows-CMakeCache.txt.log
    D:\...\buildtrees\openblas\config-x64-windows-CMakeCache.txt.log
    D:\...\buildtrees\openblas\config-x64-windows-out.log
    

    Fixed output:

    See logs for more information:
    D:\...\buildtrees\openblas\config-x64-windows-CMakeCache.txt.log
    D:\...\buildtrees\openblas\config-x64-windows-CMakeCache.txt-1.log
    D:\...\buildtrees\openblas\config-x64-windows-out.log
    
  • Which triplets are supported/not supported? Have you updated the CI baseline?

    all, no

  • Does your PR follow the maintainer guide?

    yes

  • If you have added/updated a port: Have you run ./vcpkg x-add-version --all and committed the result?

    not needed.

dg0yt avatar Sep 11 '22 06:09 dg0yt

Only baseline regressions. Please review, this change affects error reporting = user experience.

dg0yt avatar Sep 18 '22 03:09 dg0yt

@FrankXie05 CI is green on fourth attempt (unmodified).

dg0yt avatar Sep 19 '22 17:09 dg0yt

Ping for responses/review

  • on implemented changes
  • on @Neumann-A 's proposal to use "<rel_path_1>;<output_name_1>" "<rel_path_2>;<output_name_2>" instead of ALIAS syntax. (I dislike this as unreadable.)
  • on @Neumann-A 's proposal to offer Z_VCPKG_<something_meaningful>_LOGFILES, cf. https://github.com/microsoft/vcpkg/pull/26754#discussion_r993075497. (I like this. Suggesting Z_VCPKG_SAVE_EXTRA_LOGFILES. A portfile might append absolute paths and even use ALIAS. This would also be a debugging aid by saving installed (pkg)config files from dependencies.)

@vicroms et al.

dg0yt avatar Oct 27 '22 06:10 dg0yt

@vicroms I'm still waiting for feedback/decisions. CC @BillyONeal The underlying bug is a barrier for fixing port bugs And I have got the next changes for vcpkg_execute_required_process waiting locally.

dg0yt avatar Dec 01 '22 05:12 dg0yt

Ping @vicroms @BillyONeal

dg0yt avatar Jan 06 '23 07:01 dg0yt

This looks great, thanks for the PR!

vicroms avatar Jan 09 '23 19:01 vicroms