Skip to content

xtask windows-dev: pick a real WSL distro on Windows - #314

Open
paopaonyapi-creator wants to merge 1 commit into
libracoder:mainfrom
paopaonyapi-creator:pao/xtask-wsl-distro
Open

paopaonyapi-creator wants to merge 1 commit into
libracoder:mainfrom
paopaonyapi-creator:pao/xtask-wsl-distro

Conversation

@paopaonyapi-creator

Copy link
Copy Markdown

Split out of #259 at maintainer request, so the two Windows changes can be reviewed and tested separately (the kiri-image cancellation half stays in #259).

cargo xtask windows-dev picked Docker Desktop's internal WSL distro

On a machine where Docker Desktop is installed, wsl -l -q starts with docker-desktop, and the build failed with exit 127 (bash: Permission denied — the internal distro can't run it). After 0.2.1 the machine also has Kiri's own busybox-like kiri distro, which has no bash either.

  • choose_wsl_distro now skips docker-desktop* and Kiri's own kiri distro, with KIRI_WSL_DISTRO as an explicit override
  • wslpath and the two build scripts are scoped to the chosen distro (they used to run in the default distro, so even a correct script path could break)
  • 6 unit tests cover the selection and argument scoping

Testing

  • cargo test -p xtask --bin xtask --locked: 6 passed (5 new), exit 0
  • On this machine (Windows 11 Pro x64, Docker Desktop alongside WSL2 Ubuntu 24.04): cargo xtask windows-dev completes where main failed with exit 127, and a WiX 6 MSI built from the branch upgraded a stock 0.2.0 install in place and worked end-to-end after the upgrade.

The commit is signed (ssh ed25519) — per the note in #259 that the repo only merges signed commits.

AndreKurait added a commit to AndreKurait/asagiri that referenced this pull request Nov 16, 2026
Adapt AD PAO's public Kiri PR #314, commit
 d0d373ec1cb7cada5bcccee51b6ef19c8d2ddb12, without its unrelated formatting.

Skip Docker Desktop and Asagiri/Kiri runtime distributions during automatic
selection. Honor ASAGIRI_WSL_DISTRO and scope path conversion and both Linux
build programs to that one distribution. Request UTF-8, preserve Unicode
through legacy UTF-16 output, and stop on failed or malformed path conversion.
The release prebuilt-input path remains available without local WSL discovery.

Six portable regressions pass. Windows cross-check, strict Clippy, actionlint
and 29 release-workflow tests pass. Windows CI now includes xtask tests; a real
Windows/WSL development bundle build remains unverified in this adaptation.

Upstream: libracoder/kiri#314
Co-authored-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
@libracoder

Copy link
Copy Markdown
Owner

@paopaonyapi-creator thanks for this PR. Before it can be reviewed and merged, every commit needs to be signed. GitHub shows these as unsigned: 2007a34. Please sign them (GPG or SSH, with the key added to your GitHub account as a signing key), then force-push. GitHub's guide: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits

On machines with Docker Desktop, wsl -l -q starts with docker-desktop
and the build failed with exit 127: the internal distro cannot run
bash. After 0.2.1 the machine also has Kiri's own busybox-like kiri
distro, which has no bash either. choose_wsl_distro now skips
docker-desktop* and kiri, with KIRI_WSL_DISTRO as an explicit
override; wslpath and the two build scripts are scoped to the chosen
distro instead of always running in the default one.

6 unit tests cover the selection and argument scoping; cargo test
-p xtask --bin xtask: 6 passed.

Split out of libracoder#259 at maintainer request, so the kiri-image
cancellation change and this build change can be reviewed and tested
separately.
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