-
Notifications
You must be signed in to change notification settings - Fork 0
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
More swift 6 fixes #105
More swift 6 fixes #105
Conversation
WalkthroughThe changes involve modifications to the Changes
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used🔇 Additional comments (4)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
Sources/UBFoundation/Networking/UBURLRequestModifier+TokenAuthorization.swift (2)
20-20
: Approve@Sendable
addition and address line lengthThe addition of the
@Sendable
attribute to the completion handler of themodifyRequest
method is excellent, consistent with the previous change, and provides the same thread safety benefits.However, there's a minor formatting issue:
The line exceeds the recommended 120 character limit. Consider breaking it into multiple lines for better readability:
func modifyRequest( _ originalRequest: UBURLRequest, completion: @escaping @Sendable (Result<UBURLRequest, Error>) -> Void ) { // ... rest of the method implementation }🧰 Tools
🪛 SwiftLint
[Warning] 20-20: Line should be 120 characters or less; currently it has 128 characters
(line_length)
Line range hint
1-48
: Consider future deprecation of synchronous APIThe file currently maintains both synchronous (completion handler-based) and asynchronous (async/await) versions of the token authorization protocol. While this provides flexibility for different use cases, it's worth considering a plan to eventually deprecate the synchronous version in favor of the async version.
As Swift continues to evolve and async/await becomes more prevalent, maintaining a single, modern API could simplify the codebase and improve overall consistency. This is not an immediate action item but something to keep in mind for future updates.
Would you like assistance in creating a deprecation plan or drafting documentation for this potential future change?
🧰 Tools
🪛 SwiftLint
[Warning] 20-20: Line should be 120 characters or less; currently it has 128 characters
(line_length)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- Sources/UBFoundation/Networking/UBURLRequestModifier+TokenAuthorization.swift (1 hunks)
🧰 Additional context used
🪛 SwiftLint
Sources/UBFoundation/Networking/UBURLRequestModifier+TokenAuthorization.swift
[Warning] 20-20: Line should be 120 characters or less; currently it has 128 characters
(line_length)
🔇 Additional comments (1)
Sources/UBFoundation/Networking/UBURLRequestModifier+TokenAuthorization.swift (1)
15-15
: Excellent addition of@Sendable
attributeThe addition of the
@Sendable
attribute to the completion handler of thegetToken
method is a great improvement. This change enhances thread safety by explicitly indicating that the closure can be safely called from concurrent contexts. It aligns well with modern Swift concurrency practices and improves the protocol's compatibility with concurrent code.
Quality Gate passedIssues Measures |
Summary by CodeRabbit