Skip to content

Provision Bash and Unix utilities automatically on Windows - #56

Merged
helly25 merged 20 commits into
mainfrom
feat/windows-runtime
Oct 17, 2026
Merged

helly25 merged 20 commits into
mainfrom
feat/windows-runtime

Conversation

@helly25

@helly25 helly25 commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

Automatically provide Bash and Unix utilities for bashtest on Windows x86-64, including PCRE support. Users no longer need to install MSYS2, set BAZEL_SH, or adjust PATH for bashtest rules.

AG;DR

  • Targets main; dependencies Support Windows Bash and manifest-only runfiles #54 and Add named executable tools to bashtest #55 are merged, and their post-merge CI passed. Synchronize the squash-merged parent while preserving the managed runtime implementation. Prepare version 0.7.0 in MODULE.bazel, CHANGELOG.md, and external-consumer fixtures: named executable tools and automatic Windows runtime provisioning are new features.
  • Fetch the official MSYS2 2026-09-27 base archive and diffutils 3.12-1 with pinned SHA-256 hashes. Include executable/DLL runtime inputs and license files. No package manager or system installation is invoked.
  • A non-test Windows executable uses Bazel's native launcher to resolve the bundled Bash through runfiles. Its shell entry point selects the managed interpreter directly and prepends its directory to PATH. There is one actual test target; its launcher retains caller tags and visibility. The shared wrapper retains named tools and their test execution transition. Register a Windows shell toolchain pointing to the downloaded Bash because Bazel analyzes its shell-based coverage helper even for ordinary Starlark tests. Other rules_shell targets can use this local default; root-module toolchain registrations take priority. Native Bazel 7 shell rules and genrules retain separate requirements.
  • Keep the Unix rules_shell runner and Bazel 7 compatibility. The Windows runner avoids native Bazel 7 sh_test's reliance on system shell configuration.
  • Add a Windows-only regression test for bundled utility resolution, PCRE, scratch paths containing spaces, and file comparison. Windows CI removes BAZEL_SH and excludes installed Unix tools (including the WSL stub) from PATH, retaining only Windows and the runner's Node-based Bazelisk prerequisite. It runs the complete suite, manifest-only mode, and bazel run without installed Unix tools. It then uses the downloaded Bash to drive the external-consumer scripts.
  • Validation on synchronized head 55f53ba: all fresh CI checks against main pass, including Windows, Linux, macOS, release-site validation, pre-commit, and the required done gate. Windows exercises the full 9-test suite without installed Unix tools, manifest-only execution, bazel run, external consumers, golden-file updates, and test-execution-platform tools.
  • Local validation: bazel test //... (8 passing; Windows-only test incompatible on macOS), repository-wide pre-commit, and a disposable run of the release packaging script for 0.7.0. The generated archive contains the managed-runtime sources and VERSION metadata; all 8 applicable tests pass from the extracted archive on macOS. No tag or release was published.
  • Windows Bazel 7 and remote execution have not been validated.
  • Scope: Windows x86-64 bashtest runtime. Native Windows ARM64 and remote Windows execution are not validated or claimed. Upstream binaries retain their licenses; the runtime documentation records sources and update requirements.

@helly25
helly25 marked this pull request as ready for review October 17, 2026 16:49
@helly25
helly25 requested a review from Fab-Cat as a code owner October 17, 2026 16:49
@helly25
helly25 added this pull request to stack #57 October 17, 2026 16:50
@helly25
helly25 removed this pull request from stack #57 October 17, 2026 16:53
Base automatically changed from feat/test-tools to main October 17, 2026 16:57
@helly25
helly25 merged commit 3317874 into main Oct 17, 2026
6 checks passed
@helly25
helly25 deleted the feat/windows-runtime branch October 17, 2026 17:10
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.

1 participant