From 058476d95a1c1aba19f39cbad64bd30cfd1bc245 Mon Sep 17 00:00:00 2001 From: Peter Neiss Date: Sun, 13 Sep 2026 10:07:27 +0200 Subject: [PATCH 1/2] Publish a windows_amd64 puku Please's Windows port replays the Puku codelab, which downloads puku--_ and found no Windows build. Puku cross-compiles for Windows unchanged, so this adds the architecture to the release files and a job that runs the tests on windows-latest. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Djqj7h7hQ1Y9Gj99s4DLm9 --- .github/workflows/windows.yml | 20 ++++++++++++++++++++ package/BUILD | 3 +++ 2 files changed, 23 insertions(+) create mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000..883e0e9 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,20 @@ +# Puku cross-compiles for Windows without change, but nothing had run its tests there. Paths it +# writes into BUILD files and the go.mod edits it makes are where Windows would differ. +name: Windows + +on: + push: + branches: + - windows + pull_request: + +jobs: + test: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + - name: Test + run: go test ./... diff --git a/package/BUILD b/package/BUILD index af207b5..6df8e6b 100644 --- a/package/BUILD +++ b/package/BUILD @@ -6,6 +6,9 @@ architectures = [ "freebsd_amd64", "linux_amd64", "linux_arm64", + # Published only from the PeterNeiss fork, for Please's Windows port: the Puku codelab + # downloads puku--_, and upstream publishes no Windows build. + "windows_amd64", ] def cross_compile(version, arch): From e01853d12eb0f214dbf706cc46a9f5caa549ca23 Mon Sep 17 00:00:00 2001 From: Peter Neiss Date: Sun, 13 Sep 2026 10:24:54 +0200 Subject: [PATCH 2/2] Build puku for Windows with forceposix go-flags reads a leading / as an option on Windows, so every build label reached puku as a flag: `plz puku fmt //src/hello` failed with "unknown flag `/src/hello'". The forceposix tag turns that off, as Please does for itself. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Djqj7h7hQ1Y9Gj99s4DLm9 --- .plzconfig_windows_amd64 | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .plzconfig_windows_amd64 diff --git a/.plzconfig_windows_amd64 b/.plzconfig_windows_amd64 new file mode 100644 index 0000000..d80d691 --- /dev/null +++ b/.plzconfig_windows_amd64 @@ -0,0 +1,7 @@ +; Layered on .plzconfig for windows_amd64 builds. + +[Plugin "go"] +; go-flags treats a leading / as an option on Windows, so `plz puku fmt //src/hello` failed with +; "unknown flag `/src/hello'". forceposix turns that off, as Please itself does for the same +; reason: every build label starts with //. +BuildTags = forceposix