remove unnecessary preconcurrency imports (#28)

* remove unnecessary preconcurrency imports

motivation: eliminate warnings

changes: require swift 5.7 and remove unnecessary preconcurrency imports for foundation

* fixup
This commit is contained in:
tomer doron
2023-01-10 16:23:39 -08:00
committed by GitHub
parent 501fe8ced1
commit 0bd5d23606
8 changed files with 12 additions and 48 deletions

View File

@@ -1,4 +1,4 @@
// swift-tools-version:5.6
// swift-tools-version:5.7
import PackageDescription

View File

@@ -12,10 +12,10 @@
//
//===----------------------------------------------------------------------===//
#if swift(>=5.6)
@preconcurrency import struct Foundation.Date
#else
#if canImport(Darwin)
import struct Foundation.Date
#else
@preconcurrency import struct Foundation.Date
#endif
/// EventBridge has the same events/notification types as CloudWatch

View File

@@ -12,10 +12,10 @@
//
//===----------------------------------------------------------------------===//
#if swift(>=5.6)
@preconcurrency import struct Foundation.Date
#else
#if canImport(Darwin)
import struct Foundation.Date
#else
@preconcurrency import struct Foundation.Date
#endif
// https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html

View File

@@ -12,10 +12,10 @@
//
//===----------------------------------------------------------------------===//
#if swift(>=5.6)
@preconcurrency import struct Foundation.Date
#else
#if canImport(Darwin)
import struct Foundation.Date
#else
@preconcurrency import struct Foundation.Date
#endif
import class Foundation.DateFormatter
import struct Foundation.Locale

View File

@@ -1,18 +0,0 @@
version: "3"
services:
runtime-setup:
image: swift-aws-lambda-events:al2-5.4
build:
args:
swift_version: "5.4"
test:
image: swift-aws-lambda-events:al2-5.4
test-samples:
image: swift-aws-lambda-events:al2-5.4
shell:
image: swift-aws-lambda-events:al2-5.4

View File

@@ -1,18 +0,0 @@
version: "3"
services:
runtime-setup:
image: swift-aws-lambda-events:al2-5.5
build:
args:
swift_version: "5.5"
test:
image: swift-aws-lambda-events:al2-5.5
test-samples:
image: swift-aws-lambda-events:al2-5.5
shell:
image: swift-aws-lambda-events:al2-5.5

View File

@@ -6,7 +6,7 @@ services:
image: swift-aws-lambda-events:al2-5.7
build:
args:
base_image: "swiftlang/swift:nightly-main-amazonlinux2"
swift_version: "5.7"
test:
image: swift-aws-lambda-events:al2-5.7

View File

@@ -1,6 +1,6 @@
# this file is not designed to be run directly
# instead, use the docker-compose.<os>.<swift> files
# eg docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.al2.52.yaml run test
# eg docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.al2.57.yaml run test
version: "3"
services: