Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd831ac5

Browse files
authored
Fix up Fluent provider for Sendable-correct FluentKit (#774)
* Bump minimum Swift to 5.8, add feature flags.* Structural/CI updates* Update to account for Sendable-correct FluentKit
1 parenta586a5d commitd831ac5

22 files changed

+91
-74
lines changed

‎.github/workflows/test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ on:
88

99
jobs:
1010
unit-tests:
11-
uses:vapor/ci/.github/workflows/run-unit-tests.yml@main
11+
uses:vapor/ci/.github/workflows/run-unit-tests.yml@main
12+
secrets:inherit

‎Package.swift

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.7
1+
// swift-tools-version:5.8
22
import PackageDescription
33

44
letpackage=Package(
@@ -13,18 +13,37 @@ let package = Package(
1313
.library(name:"Fluent", targets:["Fluent"]),
1414
],
1515
dependencies:[
16-
.package(url:"https://github.com/vapor/fluent-kit.git", from:"1.45.0"),
17-
.package(url:"https://github.com/vapor/vapor.git", from:"4.91.1"),
16+
.package(url:"https://github.com/vapor/fluent-kit.git", from:"1.48.0"),
17+
.package(url:"https://github.com/vapor/vapor.git", from:"4.94.1"),
1818
],
1919
targets:[
20-
.target(name:"Fluent", dependencies:[
21-
.product(name:"FluentKit",package:"fluent-kit"),
22-
.product(name:"Vapor",package:"vapor"),
23-
]),
24-
.testTarget(name:"FluentTests", dependencies:[
25-
.target(name:"Fluent"),
26-
.product(name:"XCTFluent",package:"fluent-kit"),
27-
.product(name:"XCTVapor",package:"vapor"),
28-
]),
20+
.target(
21+
name:"Fluent",
22+
dependencies:[
23+
.product(name:"FluentKit",package:"fluent-kit"),
24+
.product(name:"Vapor",package:"vapor"),
25+
],
26+
swiftSettings: swiftSettings
27+
),
28+
.testTarget(
29+
name:"FluentTests",
30+
dependencies:[
31+
.target(name:"Fluent"),
32+
.product(name:"XCTFluent",package:"fluent-kit"),
33+
.product(name:"XCTVapor",package:"vapor"),
34+
],
35+
swiftSettings: swiftSettings
36+
),
2937
]
3038
)
39+
40+
varswiftSettings:[SwiftSetting]{[
41+
.enableUpcomingFeature("ConciseMagicFile"),
42+
.enableUpcomingFeature("ForwardTrailingClosures"),
43+
.enableUpcomingFeature("ImportObjcForwardDeclarations"),
44+
.enableUpcomingFeature("DisableOutwardActorInference"),
45+
.enableUpcomingFeature("IsolatedDefaultValues"),
46+
.enableUpcomingFeature("GlobalConcurrency"),
47+
.enableUpcomingFeature("StrictConcurrency"),
48+
.enableExperimentalFeature("StrictConcurrency=complete"),
49+
]}

‎Package@swift-5.9.swift

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ let package = Package(
1313
.library(name:"Fluent", targets:["Fluent"]),
1414
],
1515
dependencies:[
16-
.package(url:"https://github.com/vapor/fluent-kit.git", from:"1.45.0"),
17-
.package(url:"https://github.com/vapor/vapor.git", from:"4.91.1"),
16+
.package(url:"https://github.com/vapor/fluent-kit.git", from:"1.48.0"),
17+
.package(url:"https://github.com/vapor/vapor.git", from:"4.94.1"),
1818
],
1919
targets:[
2020
.target(
@@ -23,10 +23,7 @@ let package = Package(
2323
.product(name:"FluentKit",package:"fluent-kit"),
2424
.product(name:"Vapor",package:"vapor"),
2525
],
26-
swiftSettings:[
27-
.enableUpcomingFeature("ExistentialAny"),
28-
.enableExperimentalFeature("StrictConcurrency=complete"),
29-
]
26+
swiftSettings: swiftSettings
3027
),
3128
.testTarget(
3229
name:"FluentTests",
@@ -35,10 +32,19 @@ let package = Package(
3532
.product(name:"XCTFluent",package:"fluent-kit"),
3633
.product(name:"XCTVapor",package:"vapor"),
3734
],
38-
swiftSettings:[
39-
.enableUpcomingFeature("ExistentialAny"),
40-
.enableExperimentalFeature("StrictConcurrency=complete"),
41-
]
35+
swiftSettings: swiftSettings
4236
),
4337
]
4438
)
39+
40+
varswiftSettings:[SwiftSetting]{[
41+
.enableUpcomingFeature("ExistentialAny"),
42+
.enableUpcomingFeature("ConciseMagicFile"),
43+
.enableUpcomingFeature("ForwardTrailingClosures"),
44+
.enableUpcomingFeature("ImportObjcForwardDeclarations"),
45+
.enableUpcomingFeature("DisableOutwardActorInference"),
46+
.enableUpcomingFeature("IsolatedDefaultValues"),
47+
.enableUpcomingFeature("GlobalConcurrency"),
48+
.enableUpcomingFeature("StrictConcurrency"),
49+
.enableExperimentalFeature("StrictConcurrency=complete"),
50+
]}

‎README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
<ahref="https://docs.vapor.codes/4.0/"><imgsrc="https://design.vapor.codes/images/readthedocs.svg"alt="Documentation"></a>
1010
<ahref="https://discord.gg/vapor"><imgsrc="https://design.vapor.codes/images/discordchat.svg"alt="Team Chat"></a>
1111
<ahref="LICENSE"><imgsrc="https://design.vapor.codes/images/mitlicense.svg"alt="MIT License"></a>
12-
<ahref="https://github.com/vapor/fluent/actions/workflows/test.yml"><imgsrc="https://img.shields.io/github/actions/workflow/status/vapor/fluent/test.yml?event=push&style=plastic&logo=github&label=test&logoColor=%23ccc"alt="Continuous Integration"></a>
13-
<ahref="https://codecov.io/github/vapor/fluent"><imgsrc="https://img.shields.io/codecov/c/github/vapor/fluent?style=plastic&logo=codecov&label=Codecov&token=yDzzHja8lt"></a>
14-
<ahref="https://swift.org"><imgsrc="https://design.vapor.codes/images/swift57up.svg"alt="Swift 5.7+"></a>
12+
<ahref="https://github.com/vapor/fluent/actions/workflows/test.yml"><imgsrc="https://img.shields.io/github/actions/workflow/status/vapor/fluent/test.yml?event=push&style=plastic&logo=github&label=tests&logoColor=%23ccc"alt="Continuous Integration"></a>
13+
<ahref="https://codecov.io/github/vapor/fluent"><imgsrc="https://img.shields.io/codecov/c/github/vapor/fluent?style=plastic&logo=codecov&label=codecov&token=yDzzHja8lt"></a>
14+
<ahref="https://swift.org"><imgsrc="https://design.vapor.codes/images/swift58up.svg"alt="Swift 5.8+"></a>
1515
</p>
1616

1717
<br>

‎Sources/Fluent/Concurrency/FluentProvider+Concurrency.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import Vapor
32
import FluentKit
43

‎Sources/Fluent/Concurrency/ModelCredentialsAuthenticatable+Concurrency.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import NIOCore
22
import Vapor
3-
@preconcurrencyimport FluentKit
3+
import FluentKit
44

55
extensionModelCredentialsAuthenticatable{
66
publicstaticfunc asyncCredentialsAuthenticator(

‎Sources/Fluent/Concurrency/Sessions+Concurrency.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import NIOCore
22
import Vapor
3-
@preconcurrencyimport FluentKit
3+
import FluentKit
44

55
extensionModelwhere Self:SessionAuthenticatable, Self.SessionID==Self.IDValue{
66
publicstaticfunc asyncSessionAuthenticator(

‎Sources/Fluent/Docs.docc/theme-settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"theme": {
3-
"aside": {"border-radius":"6px","border-style":"double","border-width":"3px" },
3+
"aside": {"border-radius":"16px","border-style":"double","border-width":"3px" },
44
"border-radius":"0",
55
"button": {"border-radius":"16px","border-width":"1px","border-style":"solid" },
66
"code": {"border-radius":"16px","border-width":"1px","border-style":"solid" },

‎Sources/Fluent/Exports.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
#if swift(>=5.8)
2-
31
@_documentation(visibility: internal)@_exportedimport FluentKit
42

5-
#else
6-
7-
@_exportedimport FluentKit
8-
9-
#endif
10-
113
infix operator~~
124
infix operator=~
135
infix operator!~

‎Sources/Fluent/Fluent+Cache.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import NIOCore
22
import Foundation
33
import Vapor
4-
@preconcurrencyimport FluentKit
4+
import FluentKit
55

66
extensionApplication.Caches{
77
publicvarfluent:anyCache{
@@ -49,10 +49,7 @@ private struct FluentCache: Cache {
4949
}
5050
}
5151

52-
func set<T>(_ key:String, to value:T?)->EventLoopFuture<Void>
53-
where T:Encodable
54-
55-
{
52+
func set(_ key:String, to value:(someEncodable)?)->EventLoopFuture<Void>{
5653
iflet value= value{
5754
do{
5855
letdata=tryJSONEncoder().encode(value)
@@ -74,7 +71,7 @@ private struct FluentCache: Cache {
7471
}
7572
}
7673

77-
publicfinalclassCacheEntry:Model{
74+
publicfinalclassCacheEntry:Model,@uncheckedSendable{
7875
publicstaticletschema:String="_fluent_cache"
7976

8077
structCreate:Migration{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp