Problem
GOOS=windows go build ./... fails on main:
internal/upgrade.go:170:48: unknown field Setsid in struct literal of type syscall.SysProcAttr
internal/upgrade.go uses Unix-only restart logic (exec.Command("sh", "-c", ...) + syscall.SysProcAttr{Setsid: true}) with no build tags, so windows has never actually compiled — the README's former windows cross-compile example was aspirational. PR #38 briefly added windows to the GoReleaser matrix and had to back it out (caught by automated review; the matrix-lockstep guard test added there will fail loudly if one side is changed without the other).
Work needed to ship windows
- Split the restart logic the way
lock_unix.go / lock_windows.go already are: move the sh -c + Setsid path into upgrade_unix.go (//go:build !windows), add upgrade_windows.go with a real windows restart (or a documented unsupported error)
- Make the self-upgrade extractor format-aware:
internal/upgrade.go hardcodes upgrade-download.tar.gz and only imports archive/tar; windows release archives would be .zip
- Re-add
windows to .goreleaser.yaml goos + zip format_overrides, re-add the two win32 pairs to PLATFORMS in npm/scripts/prepare-packages.js (+ shim map and exe handling) — the guard test enforces both sides move together
- Extend the CI cross-compile step in
ci.yml with windows/amd64, windows/arm64
- Consider a
windows-latest CI leg that installs and runs the generated npm package end to end
- Note: octo-fleet rejects windows remote upgrades in v1 (
createDaemonUpgradeTask), so install-only support is shippable before the upgrade path is
Context
Split out of #37 / PR #38 (npm distribution), where windows packages were descoped to keep that PR release-logic-only.
Problem
GOOS=windows go build ./...fails onmain:internal/upgrade.gouses Unix-only restart logic (exec.Command("sh", "-c", ...)+syscall.SysProcAttr{Setsid: true}) with no build tags, so windows has never actually compiled — the README's former windows cross-compile example was aspirational. PR #38 briefly added windows to the GoReleaser matrix and had to back it out (caught by automated review; the matrix-lockstep guard test added there will fail loudly if one side is changed without the other).Work needed to ship windows
lock_unix.go/lock_windows.goalready are: move thesh -c+Setsidpath intoupgrade_unix.go(//go:build !windows), addupgrade_windows.gowith a real windows restart (or a documented unsupported error)internal/upgrade.gohardcodesupgrade-download.tar.gzand only importsarchive/tar; windows release archives would be.zipwindowsto.goreleaser.yamlgoos+ zipformat_overrides, re-add the two win32 pairs toPLATFORMSinnpm/scripts/prepare-packages.js(+ shim map and exe handling) — the guard test enforces both sides move togetherci.ymlwithwindows/amd64,windows/arm64windows-latestCI leg that installs and runs the generated npm package end to endcreateDaemonUpgradeTask), so install-only support is shippable before the upgrade path isContext
Split out of #37 / PR #38 (npm distribution), where windows packages were descoped to keep that PR release-logic-only.