Skip to content

Conversation

@dg0yt
Copy link
Contributor

@dg0yt dg0yt commented Nov 30, 2025

Exposing and fixing the bug:

  • maybe-skip is excluded
  • maybe-direct-cascade is reused from cache
  • maybe-transitive-cascade fails to build due to lack of the transitive maybe-skip dependency.

Modeling vcpkg CI regressions, e.g. microsoft/vcpkg#48557 (comment):

Installing 303/507 opencv4[ade,aravis,calib3d,contrib,core,directml,dnn,dshow,eigen,ffmpeg,fs,gapi,highgui,intrinsics,jpeg,jpegxl,msmf,nonfree,opencl,openexr,openmp,png,quirc,thread,tiff,webp,win32ui]:[email protected]#8...
Excluded opencv4:arm64-windows-static-md
Elapsed time to handle opencv4:arm64-windows-static-md: 14.5 us
Installing 304/507 opencv[ade,aravis,calib3d,contrib,core,directml,dnn,dshow,eigen,ffmpeg,fs,highgui,intrinsics,jpeg,jpegxl,msmf,nonfree,opencl,openexr,openmp,png,quirc,thread,tiff,webp,win32ui]:[email protected]...
Elapsed time to handle opencv:arm64-windows-static-md: 70.5 ms

CC @BillyONeal

Comment on lines +106 to -109
if (-not ($Output -match 'always-cascade:[^:]+: cascade\n')) {
throw 'did not identify always-cascade as cascaded'
}
# This should be statically determinable but at the moment we do not
# if (-not ($Output -match 'always-cascade:[^:]+: cascade\n')) {
# throw 'tried to build cascaded'
# }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it does statically determine the cascade and no longer adds always-cascade to the installation plan.

@dg0yt dg0yt marked this pull request as ready for review December 1, 2025 20:16
@dg0yt dg0yt changed the title Test transitive cascade with --skip-failures Test --skip-failures and fix transitive cascade Dec 1, 2025
@dg0yt dg0yt changed the title Test --skip-failures and fix transitive cascade Test --skip-failures and fix "static" cascade Dec 1, 2025
@dg0yt dg0yt marked this pull request as draft December 2, 2025 07:06
@dg0yt
Copy link
Contributor Author

dg0yt commented Dec 2, 2025

The operation seems correct now with maybe-cross-cascade being skipped as cascade for the cross triplet.
However, for the cross build vcpkg no longer prints the actually exluded host port (maybe-skip:x64-linux in my case) when determining pass/fail. The elimination of the transitive host install actions in calculate_ci_specs happens before output preparation compute_pre_build_statuses.

Detecting compiler hash for triplet x86-linux...
Compiler found: /usr/bin/i686-linux-gnu-g++
                  always-built:x86-linux:      *: 764e2d5713011eeb32e12af57469444bafdf4cada17de833a3c7302c9442a79d
                always-cascade:x86-linux: cascade
                   always-skip:x86-linux: skip
           maybe-cross-cascade:x86-linux: cascade
          maybe-direct-cascade:x86-linux:      *: 34dfceac04ead20f8ddcfc5784fb6005624d7be2f93584ca1c692e9be7535f7c
                    maybe-skip:x86-linux:      *: 6495ddd043af822fcd51752a7ea5a8bc8bc39b0e3cb7ffec3f4f6c8d9b62ab90
      maybe-transitive-cascade:x86-linux:      *: 15a9752714e29d112d7a076102e33c76881e3cbf672fc9a58985567eaa0946ca
Time to determine pass/fail: 354 ms

@BillyONeal
Copy link
Member

That seems like just another case of the 'non-leaf' case which is why I was trying to fix it in the dependency planner in the first place.

@dg0yt dg0yt marked this pull request as ready for review December 3, 2025 02:29
@dg0yt
Copy link
Contributor Author

dg0yt commented Dec 3, 2025

NB: e2e tests have $Triplet = 'x64-linux' on linux. It is native for the x64-linux CI job, but a cross build for the arm64-linux CI job. It might be desired to explictly ensure native builds also for arm64.

@dg0yt
Copy link
Contributor Author

dg0yt commented Dec 3, 2025

Now using a target triplet named cross which is a copy of $Triplet:

  Detecting compiler hash for triplet cross...
  Compiler found: /usr/bin/c++
                        always-built:cross:      *: 5057be31d1fdb68955a419afa9c8f1f507c8a09bcddfef3c54bb96a5b3de589d
                      always-cascade:cross: cascade
                         always-skip:cross: skip
                 maybe-cross-cascade:cross: cascade
                maybe-direct-cascade:cross:      *: 4ffa464e3c4c76cebef293ca7f6d44df268ade285d9b9a3376fe3e474d3e7314
                          maybe-skip:cross:      *: ea00b56c6eb88911d11dbb6e8ecba3366258efd6e127f1a66a716963b3afa56a
            maybe-transitive-cascade:cross:      *: ee8c529f77c7c82578fd92afec44a476d7ecd6e8de098791305bcd01ea131e1e
  Time to determine pass/fail: 1.9 s
  The following packages will be built and installed:
      always-built:[email protected]
      maybe-direct-cascade:[email protected]
      maybe-skip:[email protected]
      maybe-transitive-cascade:[email protected]
  
  
  Triplet: cross
  
  SUMMARY FOR cross
    CASCADED_DUE_TO_MISSING_DEPENDENCIES: 2
    EXCLUDED: 1
    EXCLUDED_BY_DRY_RUN: 4

@BillyONeal BillyONeal merged commit 3536bb0 into microsoft:main Dec 3, 2025
7 checks passed
@BillyONeal
Copy link
Member

Thanks!

@dg0yt dg0yt deleted the exclude-cascade branch December 3, 2025 20:41
@BillyONeal
Copy link
Member

NB: e2e tests have $Triplet = 'x64-linux' on linux. It is native for the x64-linux CI job, but a cross build for the arm64-linux CI job. It might be desired to explictly ensure native builds also for arm64.

Fixed in #1873

BillyONeal added a commit to BillyONeal/vcpkg that referenced this pull request Dec 5, 2025
https://github.com/microsoft/vcpkg-tool/releases/tag/2025-12-05

* Bump js-yaml from 4.1.0 to 4.1.1 in /vcpkg-artifacts by @dependabot[bot] in microsoft/vcpkg-tool#1847
* Bump glob from 10.4.5 to 10.5.0 in /vcpkg-artifacts by @dependabot[bot] in microsoft/vcpkg-tool#1857
* Test parent hashes without actual build by @dg0yt in microsoft/vcpkg-tool#1870
* Fix qualified PackageSpec parse hang. by @BillyONeal in microsoft/vcpkg-tool#1872
* Test --skip-failures and fix "static" cascade by @dg0yt in microsoft/vcpkg-tool#1871
* Update scripts SHA 2025-12-03 and update github actions runners. by @BillyONeal in microsoft/vcpkg-tool#1873

Thanks for the `ci` improvements @dg0yt !
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