Skip to content

Commit dff95ad

Browse files
committed
Squashed commit of the following:
commit ab8166a Author: Franz Busch <[email protected]> Date: Mon Aug 26 16:36:07 2024 +0200 [CI] Add GHA CI and release flow (swift-server#340) Co-authored-by: Fabian Fett <[email protected]> Co-authored-by: Sébastien Stormacq <[email protected]> Co-authored-by: Mahdi Bahrami <[email protected]> commit 5ecc24f Author: Andrea Scuderi <[email protected]> Date: Mon Aug 26 13:00:07 2024 +0200 Add Breeze to projects.md (swift-server#343) authored-by: Andrea Scuderi <[email protected]> commit 8676c89 Author: Sébastien Stormacq <[email protected]> Date: Mon Aug 26 12:25:41 2024 +0200 apply swiftformat (swift-server#342) * apply swiftformat * update dep on Swift Docc to v1.3.0 * force usage of swift docc plugin 1.3.0 commit 79fa2c2 Author: Alessio Buratti <[email protected]> Date: Fri Aug 23 18:50:22 2024 +0200 [Draft] Detached tasks (swift-server#334) * First prototype * Fix build * Removes task cancellation swift-server#334 (comment) * Force user to handle errors swift-server#334 (comment) * Remove EventLoop API swift-server#334 (comment) * Make DetachedTaskContainer internal swift-server#334 (comment) swift-server#334 (comment) * Removes @unchecked Sendable swift-server#334 (comment) * Invoke awaitAll() from async context * Fix ambiguous expression type for swift 5.7 * Fix visibility of detachedBackgroundTask * Add swift-doc * Add example usage to readme * Add tests --------- Co-authored-by: Sébastien Stormacq <[email protected]>
1 parent 3800613 commit dff95ad

File tree

66 files changed

+1113
-760
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1113
-760
lines changed

Diff for: .github/release.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
changelog:
2+
categories:
3+
- title: SemVer Major
4+
labels:
5+
- ⚠️ semver/major
6+
- title: SemVer Minor
7+
labels:
8+
- semver/minor
9+
- title: SemVer Patch
10+
labels:
11+
- semver/patch
12+
- title: Other Changes
13+
labels:
14+
- semver/none
15+
- "*"

Diff for: .github/workflows/pull_request.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: PR
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, synchronize]
6+
7+
jobs:
8+
soundness:
9+
name: Soundness
10+
uses: apple/swift-nio/.github/workflows/soundness.yml@main
11+
with:
12+
license_header_check_project_name: "SwiftAWSLambdaRuntime"
13+
shell_check_enabled: false
14+
15+
unit-tests:
16+
name: Unit tests
17+
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
18+
with:
19+
linux_5_8_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
20+
linux_5_9_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
21+
linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
22+
linux_nightly_6_0_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
23+
linux_nightly_main_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
24+
25+
swift-6-language-mode:
26+
name: Swift 6 Language Mode
27+
uses: apple/swift-nio/.github/workflows/swift_6_language_mode.yml@main

Diff for: .licenseignore

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
.gitignore
2+
.licenseignore
3+
.swiftformatignore
4+
.spi.yml
5+
.swift-format
6+
.github/*
7+
*.md
8+
**/*.md
9+
CONTRIBUTORS.txt
10+
LICENSE.txt
11+
NOTICE.txt
12+
Package.swift
13+
Package@swift-*.swift
14+
Package.resolved
15+
**/*.docc/*
16+
**/.gitignore
17+
**/Package.swift
18+
**/Package.resolved
19+
**/docker-compose*.yaml
20+
**/docker/*
21+
**/.dockerignore
22+
**/Dockerfile
23+
**/Makefile
24+
**/*.html
25+
**/*-template.yml
26+
**/*.xcworkspace/*
27+
**/*.xcodeproj/*
28+
**/*.xcassets/*
29+
**/*.appiconset/*
30+
**/ResourcePackaging/hello.txt
31+
.mailmap
32+
.swiftformat

Diff for: .swift-format

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"version" : 1,
3+
"indentation" : {
4+
"spaces" : 4
5+
},
6+
"tabWidth" : 4,
7+
"fileScopedDeclarationPrivacy" : {
8+
"accessLevel" : "private"
9+
},
10+
"spacesAroundRangeFormationOperators" : false,
11+
"indentConditionalCompilationBlocks" : false,
12+
"indentSwitchCaseLabels" : false,
13+
"lineBreakAroundMultilineExpressionChainComponents" : false,
14+
"lineBreakBeforeControlFlowKeywords" : false,
15+
"lineBreakBeforeEachArgument" : true,
16+
"lineBreakBeforeEachGenericRequirement" : true,
17+
"lineLength" : 120,
18+
"maximumBlankLines" : 1,
19+
"respectsExistingLineBreaks" : true,
20+
"prioritizeKeepingFunctionOutputTogether" : true,
21+
"rules" : {
22+
"AllPublicDeclarationsHaveDocumentation" : false,
23+
"AlwaysUseLiteralForEmptyCollectionInit" : false,
24+
"AlwaysUseLowerCamelCase" : false,
25+
"AmbiguousTrailingClosureOverload" : true,
26+
"BeginDocumentationCommentWithOneLineSummary" : false,
27+
"DoNotUseSemicolons" : true,
28+
"DontRepeatTypeInStaticProperties" : true,
29+
"FileScopedDeclarationPrivacy" : true,
30+
"FullyIndirectEnum" : true,
31+
"GroupNumericLiterals" : true,
32+
"IdentifiersMustBeASCII" : true,
33+
"NeverForceUnwrap" : false,
34+
"NeverUseForceTry" : false,
35+
"NeverUseImplicitlyUnwrappedOptionals" : false,
36+
"NoAccessLevelOnExtensionDeclaration" : true,
37+
"NoAssignmentInExpressions" : true,
38+
"NoBlockComments" : true,
39+
"NoCasesWithOnlyFallthrough" : true,
40+
"NoEmptyTrailingClosureParentheses" : true,
41+
"NoLabelsInCasePatterns" : true,
42+
"NoLeadingUnderscores" : false,
43+
"NoParensAroundConditions" : true,
44+
"NoVoidReturnOnFunctionSignature" : true,
45+
"OmitExplicitReturns" : true,
46+
"OneCasePerLine" : true,
47+
"OneVariableDeclarationPerLine" : true,
48+
"OnlyOneTrailingClosureArgument" : true,
49+
"OrderedImports" : true,
50+
"ReplaceForEachWithForLoop" : true,
51+
"ReturnVoidInsteadOfEmptyTuple" : true,
52+
"UseEarlyExits" : false,
53+
"UseExplicitNilCheckInConditions" : false,
54+
"UseLetInEveryBoundCaseVariable" : false,
55+
"UseShorthandTypeNames" : true,
56+
"UseSingleLinePropertyGetter" : false,
57+
"UseSynthesizedInitializer" : false,
58+
"UseTripleSlashForDocumentationComments" : true,
59+
"UseWhereClausesInForLoops" : false,
60+
"ValidateDocumentationComments" : false
61+
}
62+
}

Diff for: .swiftformat

-19
This file was deleted.

Diff for: Examples/Benchmark/Package.swift

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
11
// swift-tools-version:5.7
22

3-
import class Foundation.ProcessInfo // needed for CI to test the local version of the library
43
import PackageDescription
54

5+
import class Foundation.ProcessInfo // needed for CI to test the local version of the library
6+
67
let package = Package(
78
name: "swift-aws-lambda-runtime-example",
89
platforms: [
9-
.macOS(.v12),
10+
.macOS(.v12)
1011
],
1112
products: [
12-
.executable(name: "MyLambda", targets: ["MyLambda"]),
13+
.executable(name: "MyLambda", targets: ["MyLambda"])
1314
],
1415
dependencies: [
15-
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha"),
16+
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha")
1617
],
1718
targets: [
1819
.executableTarget(
1920
name: "MyLambda",
2021
dependencies: [
21-
.product(name: "AWSLambdaRuntimeCore", package: "swift-aws-lambda-runtime"),
22+
.product(name: "AWSLambdaRuntimeCore", package: "swift-aws-lambda-runtime")
2223
],
2324
path: "."
24-
),
25+
)
2526
]
2627
)
2728

2829
// for CI to test the local version of the library
2930
if ProcessInfo.processInfo.environment["LAMBDA_USE_LOCAL_DEPS"] != nil {
3031
package.dependencies = [
31-
.package(name: "swift-aws-lambda-runtime", path: "../.."),
32+
.package(name: "swift-aws-lambda-runtime", path: "../..")
3233
]
3334
}

Diff for: Examples/Deployment/Package.swift

+17-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
// swift-tools-version:5.7
22

3-
import class Foundation.ProcessInfo // needed for CI to test the local version of the library
43
import PackageDescription
54

5+
import class Foundation.ProcessInfo // needed for CI to test the local version of the library
6+
67
let package = Package(
78
name: "swift-aws-lambda-runtime-samples",
89
platforms: [
9-
.macOS(.v12),
10+
.macOS(.v12)
1011
],
1112
products: [
1213
// introductory example
@@ -16,21 +17,27 @@ let package = Package(
1617
// demonstrate different types of error handling
1718
],
1819
dependencies: [
19-
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha"),
20+
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha")
2021
],
2122
targets: [
22-
.executableTarget(name: "Benchmark", dependencies: [
23-
.product(name: "AWSLambdaRuntimeCore", package: "swift-aws-lambda-runtime"),
24-
]),
25-
.executableTarget(name: "HelloWorld", dependencies: [
26-
.product(name: "AWSLambdaRuntime", package: "swift-aws-lambda-runtime"),
27-
]),
23+
.executableTarget(
24+
name: "Benchmark",
25+
dependencies: [
26+
.product(name: "AWSLambdaRuntimeCore", package: "swift-aws-lambda-runtime")
27+
]
28+
),
29+
.executableTarget(
30+
name: "HelloWorld",
31+
dependencies: [
32+
.product(name: "AWSLambdaRuntime", package: "swift-aws-lambda-runtime")
33+
]
34+
),
2835
]
2936
)
3037

3138
// for CI to test the local version of the library
3239
if ProcessInfo.processInfo.environment["LAMBDA_USE_LOCAL_DEPS"] != nil {
3340
package.dependencies = [
34-
.package(name: "swift-aws-lambda-runtime", path: "../.."),
41+
.package(name: "swift-aws-lambda-runtime", path: "../..")
3542
]
3643
}

Diff for: Examples/Echo/Package.swift

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
11
// swift-tools-version:5.7
22

3-
import class Foundation.ProcessInfo // needed for CI to test the local version of the library
43
import PackageDescription
54

5+
import class Foundation.ProcessInfo // needed for CI to test the local version of the library
6+
67
let package = Package(
78
name: "swift-aws-lambda-runtime-example",
89
platforms: [
9-
.macOS(.v12),
10+
.macOS(.v12)
1011
],
1112
products: [
12-
.executable(name: "MyLambda", targets: ["MyLambda"]),
13+
.executable(name: "MyLambda", targets: ["MyLambda"])
1314
],
1415
dependencies: [
15-
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha"),
16+
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha")
1617
],
1718
targets: [
1819
.executableTarget(
1920
name: "MyLambda",
2021
dependencies: [
21-
.product(name: "AWSLambdaRuntime", package: "swift-aws-lambda-runtime"),
22+
.product(name: "AWSLambdaRuntime", package: "swift-aws-lambda-runtime")
2223
],
2324
path: "."
24-
),
25+
)
2526
]
2627
)
2728

2829
// for CI to test the local version of the library
2930
if ProcessInfo.processInfo.environment["LAMBDA_USE_LOCAL_DEPS"] != nil {
3031
package.dependencies = [
31-
.package(name: "swift-aws-lambda-runtime", path: "../.."),
32+
.package(name: "swift-aws-lambda-runtime", path: "../..")
3233
]
3334
}

Diff for: Examples/ErrorHandling/Package.swift

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
11
// swift-tools-version:5.7
22

3-
import class Foundation.ProcessInfo // needed for CI to test the local version of the library
43
import PackageDescription
54

5+
import class Foundation.ProcessInfo // needed for CI to test the local version of the library
6+
67
let package = Package(
78
name: "swift-aws-lambda-runtime-example",
89
platforms: [
9-
.macOS(.v12),
10+
.macOS(.v12)
1011
],
1112
products: [
12-
.executable(name: "MyLambda", targets: ["MyLambda"]),
13+
.executable(name: "MyLambda", targets: ["MyLambda"])
1314
],
1415
dependencies: [
15-
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha"),
16+
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha")
1617
],
1718
targets: [
1819
.executableTarget(
1920
name: "MyLambda",
2021
dependencies: [
21-
.product(name: "AWSLambdaRuntime", package: "swift-aws-lambda-runtime"),
22+
.product(name: "AWSLambdaRuntime", package: "swift-aws-lambda-runtime")
2223
],
2324
path: "."
24-
),
25+
)
2526
]
2627
)
2728

2829
// for CI to test the local version of the library
2930
if ProcessInfo.processInfo.environment["LAMBDA_USE_LOCAL_DEPS"] != nil {
3031
package.dependencies = [
31-
.package(name: "swift-aws-lambda-runtime", path: "../.."),
32+
.package(name: "swift-aws-lambda-runtime", path: "../..")
3233
]
3334
}

0 commit comments

Comments
 (0)