Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix up Fluent provider for Sendable-correct FluentKit #774

Merged
merged 3 commits into from
Apr 27, 2024
Merged

Conversation

gwynne
Copy link
Member

@gwynne gwynne commented Apr 27, 2024

These changes are now available in 4.10.0

Updates the Fluent provider for the 1.48.0 release of FluentKit, which adds mostly-complete Sendable-correctness. Also bumps minimum Swift version to 5.8, matching FluentKit.

@gwynne gwynne added enhancement New feature or request semver-minor Contains new APIs labels Apr 27, 2024
@gwynne gwynne requested review from 0xTim, MahdiBM and ptoffy April 27, 2024 19:23
Copy link

codecov bot commented Apr 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.84%. Comparing base (a586a5d) to head (8817739).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #774      +/-   ##
==========================================
- Coverage   60.10%   59.84%   -0.27%     
==========================================
  Files          15       15              
  Lines         386      381       -5     
==========================================
- Hits          232      228       -4     
+ Misses        154      153       -1     
Files Coverage Δ
...luent/Concurrency/FluentProvider+Concurrency.swift 0.00% <ø> (ø)
.../ModelCredentialsAuthenticatable+Concurrency.swift 85.71% <ø> (ø)
...rces/Fluent/Concurrency/Sessions+Concurrency.swift 0.00% <ø> (ø)
Sources/Fluent/Fluent+Cache.swift 68.00% <100.00%> (-0.63%) ⬇️
Sources/Fluent/Fluent+History.swift 88.88% <100.00%> (ø)
Sources/Fluent/Fluent+Sessions.swift 77.41% <100.00%> (ø)
Sources/Fluent/FluentProvider.swift 78.57% <ø> (-0.74%) ⬇️
Sources/Fluent/ModelAuthenticatable.swift 0.00% <ø> (ø)
...urces/Fluent/ModelCredentialsAuthenticatable.swift 75.00% <ø> (ø)
Sources/Fluent/ModelTokenAuthenticatable.swift 0.00% <ø> (ø)

.enableUpcomingFeature("IsolatedDefaultValues"),
.enableUpcomingFeature("GlobalConcurrency"),
.enableUpcomingFeature("StrictConcurrency"),
.enableExperimentalFeature("StrictConcurrency=complete"),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You did it the other way around. You should remove strict concurrency from here and add existential any, since this is for Swift 5.8.
Also you don't need to use the upcoming StrictConcurrency flag. They did upgrade the flag to an upcoming feature for Swift 5.10, but it's backward compatible.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. The only reason the Swift 5.9 manifest exists is because it's unsafe to use ExistentialAny with 5.8 (SwiftPM had a bug in 5.8 which caused the setting to virally propagate to anything using the package). StrictConcurrency, on the other hand, is harmless in 5.8 - yes, it's also ineffectual, but I leave it in to avoid having more of a disconnect than necessary between the two manifests (simplifies dealing with it next time there's a version bump). And yes, I'm aware of the dual flag being unnecessary, but I've used it elsewhere so I'm using it here, if you don't like it go open PRs against the other five repos I've copy-pasted this to 😛

Copy link

@MahdiBM MahdiBM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, fine. 😛

@gwynne gwynne merged commit d831ac5 into main Apr 27, 2024
10 checks passed
@gwynne gwynne deleted the sendable-fixup branch April 27, 2024 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request semver-minor Contains new APIs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants