Files
hermes-agent/scripts
dalebetz ea93303f47 fix(windows): pin vcpkg to the Visual Studio that has the arm64 toolset
scripts/windows-build-deps.ps1 discovers the ARM64-capable Visual Studio
(vswhere -requires Microsoft.VisualStudio.Component.VC.Tools.ARM64) and
initializes VsDevCmd against it, then builds OpenSSL through vcpkg. But
vcpkg resolves Visual Studio on its own and takes the newest instance. On a
host with a second BuildTools install that lacks the native arm64 toolset,
the arm64-windows triplet fails:

  error: in triplet arm64-windows: Unable to find a valid toolchain for
  requested target architecture arm64.
  The selected Visual Studio instance is at: ...\Microsoft Visual Studio\18\BuildTools
  The available toolchain combinations are: x86, amd64, x86_amd64,
  amd64_x86, arm64_x86, arm64_amd64

...in the same run that logs "-> ARM64 C++ build tools found: ...\2022\BuildTools".
The install fails, `hermes update` exits 1, the retry fails identically, and
the desktop relaunches on the previous build ("running with the previous
dependencies — run `hermes update` to finish it"), so it never updates.

Export the discovered instance as VCPKG_VISUAL_STUDIO_PATH, the documented
lever vcpkg's own error points at, without clobbering a caller's explicit pin
(same respect-if-set shape as CARGO_HOME/RUSTUP_HOME above).

Extends the initializer fixture: the discovered instance must be pinned when
unset, and a caller pin must survive the call. Needs a Windows runner — the
suite is platforms("windows") and the initializer refuses non-Windows hosts.
2026-10-02 19:37:27 -04:00
..