Fix Windows cross-compilation error in expect step (#621)#621
Closed
isaac-fletcher wants to merge 1 commit into
Closed
Fix Windows cross-compilation error in expect step (#621)#621isaac-fletcher wants to merge 1 commit into
isaac-fletcher wants to merge 1 commit into
Conversation
|
@isaac-fletcher has exported this pull request. If you are a Meta employee, you can view the originating Diff in 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
5dbf071 to
42f73cb
Compare
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
42f73cb to
18c07e9
Compare
…#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
18c07e9 to
8b24e68
Compare
|
This pull request has been merged in 4e782c0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
The goreleaser build for
windows_amd64was failing becausepty.Winsize.Colsisuint16on Unix butuinton Windows. The explicituint16(termWidth)cast inexpectstep.gocaused a type mismatch when cross-compiling.Fix uses platform-specific
newWinsizehelpers 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