Hello Arrow community, I would like to start a technical discussion about raising the minimum Swift version required to build apache/arrow-swift from the current 5.10 to 6.0.
Motivation ---------- - Swift 6.0, released in 2024, natively supports the Int128 type (SE-0425). This is a fundamental building block for robustly implementing Decimal types (Decimal32/64/128/256) in our Swift columnar implementation, which are currently marked as unsupported in our official status table. - Our CI infrastructure is already building and testing with Swift 6.0 (the 21.0.0 RC0 verification used Swift 6.0.3 and 6.1.2 successfully), which reduces the risk of this transition. - Key dependencies like grpc-swift and swift-protobuf now support or recommend Swift 6.0, simplifying dependency management and reducing the need for conditional workarounds. Expected Benefits ----------------- 1. Enable Complex Types: Unlocks native Int128, essential for high-precision decimal arithmetic and other operations. 2. Ecosystem Alignment: Reduces maintenance burden by aligning the minimum version with the one used by maintainers and modern dependencies. 3. Access to New Language Features: Allows the use of performance improvements, concurrency safety enhancements, and other Swift 6.0 features. Impact and Migration Plan ------------------------- - Breaking Change: Users still on Swift 5.10 will no longer be able to build the package. This needs to be clearly communicated in the release notes. Transition Path: - Update the swift-tools-version in Package.swift to 6.0. - Update ci/docker/ubuntu.dockerfile to use a Swift 6.0 base image. - Audit the code for any @preconcurrency imports or #if compiler directives that are no longer needed and remove them. - Test the build on Swift 6.0 and ensure the concurrency model (Sendable) is respected, or use @preconcurrency annotations where necessary. If the community agrees on this direction, I can open a Pull Request to implement the changes and update the documentation accordingly. I would appreciate feedback from maintainers (@kou, @willtemperley) and other contributors, especially on potential compatibility issues with existing consumers. Best regards, Demetrius Albuquerque [maltzsama]
