Skip to content

Prepare for building UCRT64 packages#710

Merged
dscho merged 4 commits into
git-for-windows:mainfrom
dscho:please-sh-tolerate-missing-sparse
Jun 9, 2026
Merged

Prepare for building UCRT64 packages#710
dscho merged 4 commits into
git-for-windows:mainfrom
dscho:please-sh-tolerate-missing-sparse

Conversation

@dscho

@dscho dscho commented Jun 7, 2026

Copy link
Copy Markdown
Member

This is part of the MINGW64-to-UCRT64 migration in git-for-windows/git-sdk-64#117: the .sparse/makepkg-git-i686 file is being retired, and the pseudo-architecture ucrt64 needs to be introduced for the transitional period until git-sdk-64's main branch switches from MINGW64 to UCRT64.

…k-artifact

When building the x86_64 artifact, `create_sdk_artifact` so far
unconditionally pulled the 32-bit-only paths from `.sparse/makepkg-git-i686`
into the sparse-checkout. That assumed the SDK still ships a 32-bit
flavor.

With the SDK moving from MINGW64 to UCRT64
(git-for-windows/git-sdk-64#117), the i686 environment is being dropped
outright: there is no UCRT64 i686 to migrate to, the conversion workflow
uninstalls every `mingw-w64-i686-*` package, and the `.sparse/makepkg-git-i686`
sparse-checkout definition that selected those paths has been retired.
Against such an SDK, `git show HEAD:.sparse/makepkg-git-i686` fails with
`fatal: path '.sparse/makepkg-git-i686' does not exist in 'HEAD'` and aborts
the entire artifact build.

Guard the read with the same `rev-parse -q --verify` style already used a
few lines above for `.sparse/makepkg-git`, and skip the 32-bit section
silently when the file is gone. There is nothing to fall back to: the only
purpose of that block was to add 32-bit paths to the artifact, and on a
UCRT64-only SDK that set is intentionally empty.

Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit to git-for-windows/git-sdk-64 that referenced this pull request Jun 7, 2026
So that the `ci-artifacts` and `check-for-missing-dlls` workflows can
go green on this PR before the matching build-extra change
(git-for-windows/build-extra#710) lands.

Drop this commit once that PR is merged and `git-for-windows/build-extra`
`main` carries the fix.

Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit to git-for-windows/git-sdk-64 that referenced this pull request Jun 7, 2026
So that the `ci-artifacts` and `check-for-missing-dlls` workflows can
go green on this PR before the matching build-extra change
(git-for-windows/build-extra#710) lands.

Drop this commit once that PR is merged and `git-for-windows/build-extra`
`main` carries the fix.

Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit to git-for-windows/git-sdk-64 that referenced this pull request Jun 7, 2026
So that the `ci-artifacts` and `check-for-missing-dlls` workflows can
go green on this PR before the matching build-extra change
(git-for-windows/build-extra#710) lands.

Drop this commit once that PR is merged and `git-for-windows/build-extra`
`main` carries the fix.

Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho changed the title please.sh: tolerate a missing .sparse/makepkg-git-i686 in create-sdk-artifact Prepare for building UCRT64 packages Jun 8, 2026
dscho added 3 commits June 8, 2026 13:40
This script translates a caller-supplied ARCH into both a directory
prefix (MSYSTEM_LOWER) and a Pacman architecture-segment used to
filter package names. The existing cases map x86_64 -> mingw64 /
x86_64, i.e. they assume the only x86_64 Git for Windows SDK is the
MINGW64 one.

git-sdk-64 is moving to UCRT64
(git-for-windows/git-sdk-64#117). The new
SDK is still x86_64 but its toolchain lives in /ucrt64/ and its
Pacman packages are named mingw-w64-ucrt-x86_64-*. Add a dedicated
ucrt64 case so callers that explicitly know which flavor they want
can pass ARCH=ucrt64 and get the right prefix and package names,
without having to teach this script to auto-detect.

Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
create_sdk_artifact's `case "$architecture" in` ladder hard-maps
x86_64 to MSYSTEM=MINGW64 / PREFIX=/mingw64, writes that into the
artifact's /etc/profile, and calls make-file-list.sh with
ARCH=$architecture. Against the new UCRT64 git-sdk-64
(git-for-windows/git-sdk-64#117), the
resulting artifact is broken: the profile points at /mingw64/bin
which doesn't exist, and the listed packages all carry the wrong
Pacman prefix.

Add a new ucrt64 architecture value that maps to MSYSTEM=UCRT64 and
PREFIX=/ucrt64 while keeping SDK_REPO=git-sdk-64 (the SDK has not
been renamed). The caller asks for the new flavor explicitly; the
make-file-list.sh side already knows what ARCH=ucrt64 means after
the previous commit.

Auto-detection is deliberately left alone: a dual-tree SDK (one
with both /mingw64 and /ucrt64) is rare enough that guessing the
wrong default would be more surprising than requiring the caller to
say what they want.

Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This script audits import/export DLL references in an SDK
installation. It picks the directory prefix from MSYSTEM (and only
falls back to ARCH if MSYSTEM is unset or unknown), then forwards
ARCH to make-file-list.sh to learn which Pacman packages to
install.

On the UCRT64 git-sdk-64
(git-for-windows/git-sdk-64#117) the
caller's MSYSTEM is UCRT64; today the script falls through to the
*) default and ends up with MINGW_PREFIX=mingw64 and ARCH=x86_64,
asking pacman for the long-gone mingw-w64-x86_64-* packages.

Add a UCRT64 case alongside MINGW64 and CLANGARM64 that sets
MINGW_PREFIX=ucrt64 and overrides ARCH=ucrt64 the same way
CLANGARM64 overrides it to aarch64. make-file-list.sh, taught
ARCH=ucrt64 in an earlier commit, then resolves the right Pacman
package set.

Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit to git-for-windows/git-sdk-64 that referenced this pull request Jun 8, 2026
Three coupled changes are needed so that this workflow actually
exercises the new SDK rather than silently no-op'ing or pacman-erroring
against ghost MINGW64 packages.

  * Pass `--architecture=ucrt64` to `please.sh create-sdk-artifact`,
    so the resulting build-installers tree contains `/ucrt64/bin/`
    instead of an empty `/mingw64/bin/`.

  * Prepend `build-installers/ucrt64/bin` to `$GITHUB_PATH` (not
    `mingw64/bin`, which is now empty); without this, the dll-check
    step would find no binaries at all.

  * Set `MSYSTEM=UCRT64` for the two `check-for-missing-dlls.sh`
    invocations. The script branches on `$MSYSTEM` to pick its
    `MINGW_PREFIX` and the package set it asks pacman to install;
    without the env override it falls through to the *) case and
    tries to install the long-gone `mingw-w64-x86_64-*` packages.

All three depend on the supporting changes in
git-for-windows/build-extra#710.

Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit to git-for-windows/git-sdk-64 that referenced this pull request Jun 8, 2026
So that the `ci-artifacts` and `check-for-missing-dlls` workflows can
go green on this PR before the matching build-extra change
(git-for-windows/build-extra#710) lands.

Drop this commit once that PR is merged and `git-for-windows/build-extra`
`main` carries the fix.

Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho marked this pull request as ready for review June 8, 2026 18:33
@dscho dscho requested review from mjcheetham and rimrul June 8, 2026 18:33
@dscho dscho self-assigned this Jun 8, 2026
@dscho dscho merged commit 1b68101 into git-for-windows:main Jun 9, 2026
21 checks passed
dscho added a commit to git-for-windows/git-sdk-64 that referenced this pull request Jun 10, 2026
…ing-sparse"

This reverts commit 075a9ad.

The build-extra changes that this commit was waiting on
(git-for-windows/build-extra#710) have
landed on `git-for-windows/build-extra` `main`, so the workflows
can go back to cloning the upstream branch.

Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit to git-for-windows/setup-git-for-windows-sdk that referenced this pull request Jun 16, 2026
…ers` flavors (#1362)

Follow-up to
#1361,
which added the `ucrt64` axis but only for `flavor: full`. This PR
extends that to the `minimal`, `makepkg-git`, and `build-installers`
flavors so the `ucrt64` axis is on equal footing with the others.

The Action itself doesn't need new source code for this; it just needed
`please.sh create-sdk-artifact --architecture=ucrt64` to be a working
invocation, which is what
git-for-windows/build-extra#710 adds. So the
diff here is documentation hygiene (removing the "only `full` for now"
caveats) and matrix extensions (so the new combinations are exercised
both on every PR and in the manual all-flavors run). The CI-artifacts
fast path stays suppressed for `ucrt64` until upstream grows a UCRT64
asset; that is a separate concern.
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