Skip to content

Commit 0bd5d23

Browse files
authored
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
1 parent 501fe8c commit 0bd5d23

File tree

8 files changed

+12
-48
lines changed

8 files changed

+12
-48
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.6
1+
// swift-tools-version:5.7
22

33
import PackageDescription
44

Sources/AWSLambdaEvents/Cloudwatch.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
#if swift(>=5.6)
16-
@preconcurrency import struct Foundation.Date
17-
#else
15+
#if canImport(Darwin)
1816
import struct Foundation.Date
17+
#else
18+
@preconcurrency import struct Foundation.Date
1919
#endif
2020

2121
/// EventBridge has the same events/notification types as CloudWatch

Sources/AWSLambdaEvents/DynamoDB.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
#if swift(>=5.6)
16-
@preconcurrency import struct Foundation.Date
17-
#else
15+
#if canImport(Darwin)
1816
import struct Foundation.Date
17+
#else
18+
@preconcurrency import struct Foundation.Date
1919
#endif
2020

2121
// https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html

Sources/AWSLambdaEvents/Utils/DateWrappers.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
#if swift(>=5.6)
16-
@preconcurrency import struct Foundation.Date
17-
#else
15+
#if canImport(Darwin)
1816
import struct Foundation.Date
17+
#else
18+
@preconcurrency import struct Foundation.Date
1919
#endif
2020
import class Foundation.DateFormatter
2121
import struct Foundation.Locale

docker/docker-compose.al2.54.yaml

Lines changed: 0 additions & 18 deletions
This file was deleted.

docker/docker-compose.al2.55.yaml

Lines changed: 0 additions & 18 deletions
This file was deleted.

docker/docker-compose.al2.57.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
image: swift-aws-lambda-events:al2-5.7
77
build:
88
args:
9-
base_image: "swiftlang/swift:nightly-main-amazonlinux2"
9+
swift_version: "5.7"
1010

1111
test:
1212
image: swift-aws-lambda-events:al2-5.7

docker/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# this file is not designed to be run directly
22
# instead, use the docker-compose.<os>.<swift> files
3-
# eg docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.al2.52.yaml run test
3+
# eg docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.al2.57.yaml run test
44
version: "3"
55

66
services:

0 commit comments

Comments
 (0)