Skip to content

Fix Windows cross-compilation error in expect step (#621)#621

Closed
isaac-fletcher wants to merge 1 commit into
facebookincubator:mainfrom
isaac-fletcher:export-D106692973
Closed

Fix Windows cross-compilation error in expect step (#621)#621
isaac-fletcher wants to merge 1 commit into
facebookincubator:mainfrom
isaac-fletcher:export-D106692973

Conversation

@isaac-fletcher

@isaac-fletcher isaac-fletcher commented May 29, 2026

Copy link
Copy Markdown
Contributor

Summary:

The goreleaser build for windows_amd64 was failing because pty.Winsize.Cols is uint16 on Unix but uint on Windows. The explicit uint16(termWidth) cast in expectstep.go caused a type mismatch when cross-compiling.

Fix uses platform-specific newWinsize helpers with build tags, matching the existing pattern from D85156306 (requirements_unix.go / requirements_windows.go).

Also adds a cross-compilation step to the GitHub Actions test workflow so that builds for all release targets (linux, darwin, windows) are verified on every PR before merge. This would have caught this issue before it landed.

Reviewed By: d0n601

Differential Revision: D106692973

@meta-codesync

meta-codesync Bot commented May 29, 2026

Copy link
Copy Markdown

@isaac-fletcher has exported this pull request. If you are a Meta employee, you can view the originating Diff in D106692973.

@meta-codesync meta-codesync Bot changed the title Fix Windows cross-compilation error in expect step Fix Windows cross-compilation error in expect step (#621) Jun 2, 2026
isaac-fletcher added a commit to isaac-fletcher/TTPForge that referenced this pull request Jun 2, 2026
…#621)

Summary:

The goreleaser build for `windows_amd64` was failing because `pty.Winsize.Cols` is `uint16` on Unix but `uint` on Windows. The explicit `uint16(termWidth)` cast in `expectstep.go` caused a type mismatch when cross-compiling.

Fix uses platform-specific `newWinsize` helpers with build tags, matching the existing pattern from D85156306 (`requirements_unix.go` / `requirements_windows.go`).

Also adds a cross-compilation step to the GitHub Actions test workflow so that builds for all release targets (linux, darwin, windows) are verified on every PR before merge. This would have caught this issue before it landed.

Reviewed By: d0n601

Differential Revision: D106692973
isaac-fletcher added a commit to isaac-fletcher/TTPForge that referenced this pull request Jun 2, 2026
…#621)

Summary:

The goreleaser build for `windows_amd64` was failing because `pty.Winsize.Cols` is `uint16` on Unix but `uint` on Windows. The explicit `uint16(termWidth)` cast in `expectstep.go` caused a type mismatch when cross-compiling.

Fix uses platform-specific `newWinsize` helpers with build tags, matching the existing pattern from D85156306 (`requirements_unix.go` / `requirements_windows.go`).

Also adds a cross-compilation step to the GitHub Actions test workflow so that builds for all release targets (linux, darwin, windows) are verified on every PR before merge. This would have caught this issue before it landed.

Reviewed By: d0n601

Differential Revision: D106692973
…#621)

Summary:

The goreleaser build for `windows_amd64` was failing because `pty.Winsize.Cols` is `uint16` on Unix but `uint` on Windows. The explicit `uint16(termWidth)` cast in `expectstep.go` caused a type mismatch when cross-compiling.

Fix uses platform-specific `newWinsize` helpers with build tags, matching the existing pattern from D85156306 (`requirements_unix.go` / `requirements_windows.go`).

Also adds a cross-compilation step to the GitHub Actions test workflow so that builds for all release targets (linux, darwin, windows) are verified on every PR before merge. This would have caught this issue before it landed.

Reviewed By: d0n601

Differential Revision: D106692973
@meta-codesync

meta-codesync Bot commented Jun 2, 2026

Copy link
Copy Markdown

This pull request has been merged in 4e782c0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant