Jens-G opened a new pull request, #3586: URL: https://github.com/apache/thrift/pull/3586
## THRIFT-5655: Fix Swift library build on Swift 6.x and re-enable Swift CI The Swift cross-test CI (`lib-swift`) was disabled in May 2025 (THRIFT-5864) when the `ubuntu-24.04` runner's bundled Swift toolchain moved to 6.x and the library stopped compiling. ### Root cause `TFileTransport` declared `fileHandle` as an optional `UnsafeMutablePointer<FILE>?` although it is always non-nil after init. Swift 6's `Glibc`/`Darwin` overlays annotate `fclose`/`fread`/`fwrite` as taking a non-optional `FILE*`, so the three call sites failed to compile. (The `CFSocketError` symbol named in the original ticket is **not** an issue on Swift 6.1.3.) ### Changes - **`TFileTransport`**: make `fileHandle` a non-optional `let` — fixes all three call sites at the root, with no platform conditional (correct on both Darwin and Linux). - **CI**: re-enable the `lib-swift` job and add `swift` back to the `cross-test` matrix (server + client). - **`LANGUAGES.md`**: Swift tested level `5.7` → `5.7 / 6.1`. ### Testing Verified in Docker (Linux): - `lib/swift` builds clean on **Swift 5.7** (37/37) and **Swift 6.1.3** (39/39). - Swift cross-test (`precross`) builds `TestServer` + `TestClient` on 6.1.3. - `ThriftTest` round-trips pass for **binary/compact × buffered/framed × ip/domain** (`client_exit=0`). Real Apple-platform (macOS/Xcode) coverage is not part of this PR; the fix is platform-agnostic by construction. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
