Skip to content

Commit 09768ec

Browse files
committed
The grand rename
1 parent 41ec01b commit 09768ec

23 files changed

+33
-20
lines changed

Package.swift

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ let package = Package(
88
.macOS(.v10_13),
99
],
1010
products: [
11-
// core library
11+
// this library exports `AWSLambdaRuntimeCore` and adds Foundation convenience methods
1212
.library(name: "AWSLambdaRuntime", targets: ["AWSLambdaRuntime"]),
13-
// foundaation utils for the core library
14-
.library(name: "AWSLambdaRuntimeFoundationCompat", targets: ["AWSLambdaRuntimeFoundationCompat"]),
13+
// this has all the main functionality for lambda and it does not link Foundation
14+
.library(name: "AWSLambdaRuntimeCore", targets: ["AWSLambdaRuntimeCore"]),
1515
// common AWS events
1616
.library(name: "AWSLambdaEvents", targets: ["AWSLambdaEvents"]),
1717
// for testing only
@@ -24,27 +24,37 @@ let package = Package(
2424
],
2525
targets: [
2626
.target(name: "AWSLambdaRuntime", dependencies: [
27+
.byName(name: "AWSLambdaRuntimeCore"),
28+
.product(name: "NIO", package: "swift-nio"),
29+
.product(name: "NIOFoundationCompat", package: "swift-nio"),
30+
]),
31+
.target(name: "AWSLambdaRuntimeCore", dependencies: [
2732
.product(name: "Logging", package: "swift-log"),
2833
.product(name: "Backtrace", package: "swift-backtrace"),
2934
.product(name: "NIOHTTP1", package: "swift-nio"),
3035
]),
31-
.target(name: "AWSLambdaRuntimeFoundationCompat", dependencies: [
36+
.testTarget(name: "AWSLambdaRuntimeTests", dependencies: [
37+
.byName(name: "AWSLambdaRuntimeCore"),
3238
.byName(name: "AWSLambdaRuntime"),
33-
.product(name: "NIO", package: "swift-nio"),
34-
.product(name: "NIOFoundationCompat", package: "swift-nio"),
3539
]),
36-
.testTarget(name: "AWSLambdaRuntimeTests", dependencies: ["AWSLambdaRuntime", "AWSLambdaRuntimeFoundationCompat"]),
3740
.target(name: "AWSLambdaEvents", dependencies: []),
3841
.testTarget(name: "AWSLambdaEventsTests", dependencies: ["AWSLambdaEvents"]),
3942
// testing helper
4043
.target(name: "AWSLambdaTesting", dependencies: [
41-
"AWSLambdaRuntime",
44+
.byName(name: "AWSLambdaRuntime"),
4245
.product(name: "NIO", package: "swift-nio"),
4346
]),
44-
.testTarget(name: "AWSLambdaTestingTests", dependencies: ["AWSLambdaTesting", "AWSLambdaRuntimeFoundationCompat"]),
47+
.testTarget(name: "AWSLambdaTestingTests", dependencies: [
48+
.byName(name: "AWSLambdaTesting"),
49+
.byName(name: "AWSLambdaRuntime"),
50+
]),
4551
// samples
46-
.target(name: "StringSample", dependencies: ["AWSLambdaRuntime"]),
47-
.target(name: "CodableSample", dependencies: ["AWSLambdaRuntime", "AWSLambdaRuntimeFoundationCompat"]),
52+
.target(name: "StringSample", dependencies: [
53+
.byName(name: "AWSLambdaRuntime"),
54+
]),
55+
.target(name: "CodableSample", dependencies: [
56+
.byName(name: "AWSLambdaRuntime"),
57+
]),
4858
// perf tests
4959
.target(name: "MockServer", dependencies: [
5060
.product(name: "NIOHTTP1", package: "swift-nio"),

Sources/AWSLambdaRuntimeFoundationCompat/Context+Foundation.swift renamed to Sources/AWSLambdaRuntime/Context+Foundation.swift

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

15-
import AWSLambdaRuntime
16-
import Foundation
15+
import AWSLambdaRuntimeCore
16+
import struct Foundation.Date
1717

1818
extension Lambda.Context {
1919
var deadlineDate: Date {

Sources/AWSLambdaRuntimeFoundationCompat/Lambda+Codable.swift renamed to Sources/AWSLambdaRuntime/Lambda+Codable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
import AWSLambdaRuntime
15+
@_exported import AWSLambdaRuntimeCore
1616
import class Foundation.JSONDecoder
1717
import class Foundation.JSONEncoder
1818
import NIO

Sources/AWSLambdaTesting/Lambda+Testing.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// @testable is used to access of internal functions
1818
#if DEBUG
1919
@testable import AWSLambdaRuntime
20-
@testable import AWSLambdaRuntimeFoundationCompat
20+
@testable import AWSLambdaRuntimeCore
2121
import Dispatch
2222
import Logging
2323
import NIO

Sources/CodableSample/main.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
import AWSLambdaRuntime
16-
import AWSLambdaRuntimeFoundationCompat
1716
import NIO
1817

1918
struct Request: Codable {

Sources/StringSample/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
import AWSLambdaRuntime
15+
import AWSLambdaRuntimeCore
1616
import NIO
1717

1818
// in this example we are receiving and responding with strings

Tests/AWSLambdaRuntimeTests/Lambda+CodeableTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
@testable import AWSLambdaRuntime
16-
@testable import AWSLambdaRuntimeFoundationCompat
16+
@testable import AWSLambdaRuntimeCore
1717
import NIO
1818
import XCTest
1919

Tests/AWSLambdaRuntimeTests/Lambda+StringTest.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
@testable import AWSLambdaRuntime
16+
@testable import AWSLambdaRuntimeCore
1617
import NIO
1718
import XCTest
1819

Tests/AWSLambdaRuntimeTests/LambdaRunnerTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
@testable import AWSLambdaRuntime
15+
@testable import AWSLambdaRuntimeCore
1616
import XCTest
1717

1818
class LambdaRunnerTest: XCTestCase {

Tests/AWSLambdaRuntimeTests/LambdaRuntimeClientTest.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
@testable import AWSLambdaRuntime
16+
@testable import AWSLambdaRuntimeCore
1617
import XCTest
1718

1819
class LambdaRuntimeClientTest: XCTestCase {

Tests/AWSLambdaRuntimeTests/LambdaTest.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
@testable import AWSLambdaRuntime
16+
@testable import AWSLambdaRuntimeCore
1617
import Logging
1718
import NIO
1819
import XCTest

Tests/AWSLambdaRuntimeTests/MockLambdaServer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
@testable import AWSLambdaRuntime
15+
@testable import AWSLambdaRuntimeCore
1616
import Foundation // for JSON
1717
import Logging
1818
import NIO

Tests/AWSLambdaRuntimeTests/Utils.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
@testable import AWSLambdaRuntime
16+
@testable import AWSLambdaRuntimeCore
1617
import Logging
1718
import NIO
1819
import XCTest

0 commit comments

Comments
 (0)