Skip to content

feat(shfmt): add Windows support#51964

Merged
suzuki-shunsuke merged 4 commits into
aquaproj:mainfrom
zeitlinger:shfmt-windows-support
Apr 13, 2026
Merged

feat(shfmt): add Windows support#51964
suzuki-shunsuke merged 4 commits into
aquaproj:mainfrom
zeitlinger:shfmt-windows-support

Conversation

@zeitlinger

@zeitlinger zeitlinger commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

shfmt ships Windows binaries since at least v3.8.0 (e.g. shfmt_v3.12.0_windows_amd64.exe and shfmt_v3.12.0_windows_386.exe), but the registry only lists darwin, linux, and amd64 in supported_envs.

Aqua auto-appends .exe on Windows, so no template changes are needed — only adding windows to supported_envs in all three version override entries.

Verified by checking that shfmt's GitHub releases include _windows_amd64.exe and _windows_386.exe assets across all three version constraint ranges.

Summary by CodeRabbit

  • New Features

    • shfmt package now advertises zsh support in addition to bash.
    • Added platform compatibility flags (Windows ARM emulation, Rosetta2) and arm64→arm replacement for select versions.
    • Checksums added for specific releases to improve release integrity.
  • Chores

    • Added explicit pins for several shfmt versions (v3.6.0, v3.5.1, v3.2.2, v3.1.2).

@github-actions

This comment was marked as resolved.

@coderabbitai

coderabbitai Bot commented Apr 13, 2026

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 12a8925a-707f-4c47-b1f0-18cf6610dbad

📥 Commits

Reviewing files that changed from the base of the PR and between d54011d and 2421f29.

📒 Files selected for processing (3)
  • pkgs/mvdan/sh/pkg.yaml
  • pkgs/mvdan/sh/registry.yaml
  • registry.yaml
✅ Files skipped from review due to trivial changes (1)
  • pkgs/mvdan/sh/pkg.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • registry.yaml

📝 Walkthrough

Walkthrough

Updated mvdan/sh package metadata: registry release-asset selection logic and platform handling for shfmt were revised (new exact-version and semver-based overrides, removed supported_envs/files blocks, added windows_arm_emulation/rosetta2/replacements, and checksums on specific overrides). pkg.yaml gained explicit pins for several older shfmt versions.

Changes

Cohort / File(s) Summary
Registry: shfmt overrides
pkgs/mvdan/sh/registry.yaml
Reworked version_overrides: replaced some semver rules with exact Version == "vX.Y.Z" selectors, removed supported_envs/files entries, added windows_arm_emulation: true (plus rosetta2: true and an replacements: arm64: arm in select ranges), and added per-override checksum handling (e.g., v3.6.0 uses sha256sums.txt). Final catch-all override no longer lists supported_envs. Description updated to mention zsh support.
Package pins
pkgs/mvdan/sh/pkg.yaml
Added explicit package pins: mvdan/sh@v3.6.0, @v3.5.1, @v3.2.2, and @v3.1.2 alongside existing versions.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I nibbled through tags, found versions anew,
Pawed at overrides, danced with checksums true.
Rosetta warmed my whiskers, emulation hums,
Pins snug in the burrow — release party drums! 🥕✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description is substantive and explains the rationale (Windows binaries available since v3.8.0) and implementation approach, though it does not follow the provided template structure with the checklist. Consider following the repository's description template by including the checklist items (CONTRIBUTING.md review, argd s usage, package installation verification) as specified in the template.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat(shfmt): add Windows support' clearly and accurately summarizes the main objective of the PR, which is adding Windows support to the shfmt package registry entries.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger zeitlinger force-pushed the shfmt-windows-support branch from 53fe505 to 253c955 Compare April 13, 2026 14:09
@github-actions

This comment was marked as resolved.

Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@suzuki-shunsuke

Copy link
Copy Markdown
Member

2421f29
Thank you. I re-scaffolded.

argd s -cmd shfmt -B mvdan/sh

@suzuki-shunsuke suzuki-shunsuke merged commit bf1719d into aquaproj:main Apr 13, 2026
18 of 19 checks passed
@github-project-automation github-project-automation Bot moved this to Done in main Apr 13, 2026
@suzuki-shunsuke suzuki-shunsuke added this to the v4.492.1 milestone Apr 13, 2026
@suzuki-shunsuke

Copy link
Copy Markdown
Member

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Apr 15, 2026
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [aquaproj/aqua-registry](https://github.com/aquaproj/aqua-registry) | minor | `v4.492.0` → `v4.493.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>aquaproj/aqua-registry (aquaproj/aqua-registry)</summary>

### [`v4.493.0`](https://github.com/aquaproj/aqua-registry/releases/tag/v4.493.0)

[Compare Source](aquaproj/aqua-registry@v4.492.0...v4.493.0)

[Issues](https://github.com/aquaproj/aqua-registry/issues?q=is%3Aissue+milestone%3Av4.493.0) | [Merge Requests](https://github.com/aquaproj/aqua-registry/pulls?q=is%3Apr+milestone%3Av4.493.0) | <aquaproj/aqua-registry@v4.492.0...v4.493.0>

#### 🎉 New Packages

[#&#8203;51977](aquaproj/aqua-registry#51977) [trzsz/trzsz-go](https://github.com/trzsz/trzsz-go) - trzsz-go is the go version of trzsz, makes all terminals that support local shell to support trzsz ( trz / tsz ) [@&#8203;ZeroAurora](https://github.com/ZeroAurora)
[#&#8203;51929](aquaproj/aqua-registry#51929) [micelio.dev/hif](https://micelio.dev/micelio/micelio/tree/hif) - The hif CLI - a forge-first version control system for the agent era [@&#8203;pepicrft](https://github.com/pepicrft)
[#&#8203;51717](aquaproj/aqua-registry#51717) [IBM-Cloud/ibm-cloud-cli-release](https://github.com/IBM-Cloud/ibm-cloud-cli-release) - Command line interface for IBM Cloud [@&#8203;dnwe](https://github.com/dnwe)
[#&#8203;51715](aquaproj/aqua-registry#51715) [pgplex/pgschema](https://github.com/pgplex/pgschema) - Terraform-style, declarative schema migration CLI for Postgres. Agent friendly [@&#8203;kaz](https://github.com/kaz)

#### Fixes

[#&#8203;51964](aquaproj/aqua-registry#51964) mvdan/sh: Support Windows [@&#8203;zeitlinger](https://github.com/zeitlinger)
[#&#8203;51905](aquaproj/aqua-registry#51905) temporalio/temporal: refresh server bundle binaries [@&#8203;chaptersix](https://github.com/chaptersix)

#### Security

[#&#8203;51716](aquaproj/aqua-registry#51716) gleam-lang/gleam: GitHub artifact attestations config [@&#8203;scop](https://github.com/scop)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMTMuMCIsInVwZGF0ZWRJblZlciI6IjQzLjExMy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiLCJhdXRvbWF0aW9uOmJvdC1hdXRob3JlZCIsImRlcGVuZGVuY3ktdHlwZTo6bWlub3IiXX0=-->
zeitlinger added a commit to grafana/flint that referenced this pull request Apr 16, 2026
aquaproj/aqua-registry#51964 added Windows support for shfmt and has been
merged and released. Switch to the aqua: backend so shfmt installs as a
plain binary without a version suffix in the name.

Drop versioned_bin_fmt field, resolve_bin_name(), find_bin_with_prefix(),
and .versioned_bin() builder — shfmt was the only user. Remove mise_tools
parameter from runner::run/prepare/build_invocations (no longer needed).

Add ("github:mvdan/sh", "aqua:mvdan/shfmt") to OBSOLETE_KEYS so existing
consumers get an automatic migration hint and flint update can fix it.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger zeitlinger deleted the shfmt-windows-support branch April 16, 2026 09:55
jdx pushed a commit to jdx/mise that referenced this pull request Apr 17, 2026
## Summary

- Remove `os = ["linux", "macos"]` from `registry/shfmt.toml`
- Bundled aqua-registry snapshot already supports shfmt on Windows
(aquaproj/aqua-registry#51964)
- aqua auto-completes `.exe` suffix for `format: raw` assets, so
`aqua:mvdan/sh` works on Windows
- `go:mvdan.cc/sh/v3/cmd/shfmt` cross-compiles fine

Currently the bare `shfmt` short name is filtered out on Windows at the
short-name dispatcher layer before it can reach the aqua backend,
forcing Windows users to specify `aqua:mvdan/sh` explicitly.

## Test plan

- [ ] CI

Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
zeitlinger added a commit to grafana/flint that referenced this pull request Apr 21, 2026
Blocked by aquaproj/aqua-registry#52150

## Summary

- aquaproj/aqua-registry#51964 (Windows support for shfmt) merged and
released
- Switch `check_shfmt()` from `github:mvdan/sh` to bare `shfmt` key
(mise resolves via `aqua:mvdan/sh`)
- Drop entire `versioned_bin_fmt` feature — shfmt was the only user
- Remove `mise_tools` param from
`runner::run`/`prepare`/`build_invocations` (no longer needed)
- Add `("github:mvdan/sh", "shfmt")` to `OBSOLETE_KEYS` for automatic
migration hint
- Update `mise.toml`, test fixtures, and `renovate-tracked-deps.json`

## Test plan

- [ ] CI passes (Linux, macOS, Windows)
- [ ] `flint update` migrates `github:mvdan/sh` → `shfmt` in consumer
repos
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