Problem
Types used across concurrency boundaries don't declare Sendable conformance, despite the project having strict concurrency checking enabled. This could lead to data races.
Files Affected
- Examples/Celestra/Sources/Celestra/Models/Article.swift
- Examples/Celestra/Sources/Celestra/Models/Feed.swift
- Examples/Celestra/Sources/Celestra/Services/RSSFetcherService.swift
Proposed Solution
Add explicit Sendable conformance:
struct Article: Codable, Sendable {
// ...
}
struct Feed: Codable, Sendable {
// ...
}
final class RSSFetcherService: Sendable {
// Ensure all stored properties are Sendable
// Use actors if mutable state needs protection
}
Impact
- Concurrency Safety: Prevents data races
- Compiler Help: Swift concurrency checks catch issues
- Future-Proofing: Ready for strict concurrency mode
Note
Project has strict concurrency checking enabled in Package.swift, so this is especially important.
References
Problem
Types used across concurrency boundaries don't declare
Sendableconformance, despite the project having strict concurrency checking enabled. This could lead to data races.Files Affected
Proposed Solution
Add explicit
Sendableconformance:Impact
Note
Project has strict concurrency checking enabled in Package.swift, so this is especially important.
References