mirror of
https://github.com/swift-server/swift-aws-lambda-runtime.git
synced 2026-05-03 07:22:27 +00:00
d42ae6975e
- Use the new Swift 6 `@available` macro to remove requirement on `.platform` in Package.swift. - DRY: define the swift settings once for all in `Package.swift` ### Motivation: - Remove the requirement to build on macOS 15 in `Package.swift`. This allows library builders and end users to be more flexible on their dependency requirements. - The code is optionally compiled on macOS 15 and Linux, but SPM don't enforce it anymore. - Avoid repeating ourself. Be sure the same settings are applied on all targets. ### Modifications: - Create a `var swiftSetting: [SwiftSettings]` and reuse it for all targets. - Use `AvailabilityMacro=LambdaSwift 2.0:macOS 15.0` - Add this on top of the majority struct / classes ```swift #if swift(>=6.1) @available(LambdaSwift 2.0, *) #endif ``` ### Result: When using Swift 6.1, there is no more SPM dependency on macOS 15