Build Information
Successful build of WikipediaKit, reference 3.0.4 (09538e
), with Swift 6.0 for Linux on 2 Nov 2024 11:18:20 UTC.
Swift 6 data race errors: 13
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete 2>&1
Build Log
269 | completion(searchResults, error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
270 | }
271 |
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:269:32: warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
267 |
268 | DispatchQueue.main.async {
269 | completion(searchResults, error)
| |- warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'searchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
270 | }
271 |
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:277:25: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
275 | if searchResults.offset == 0 {
276 | DispatchQueue.main.async {
277 | completion (searchResults, .notFound)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
278 | }
279 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:277:37: warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
275 | if searchResults.offset == 0 {
276 | DispatchQueue.main.async {
277 | completion (searchResults, .notFound)
| |- warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'searchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
278 | }
279 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:284:25: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
282 | searchResults.canLoadMore = false
283 | DispatchQueue.main.async {
284 | completion (searchResults, error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
285 | }
286 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:284:37: warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
282 | searchResults.canLoadMore = false
283 | DispatchQueue.main.async {
284 | completion (searchResults, error)
| |- warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'searchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
285 | }
286 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:224:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
222 | guard let query = jsonDictionary["query"] as? JSONDictionary else {
223 | DispatchQueue.main.async {
224 | completion (searchResults, .notFound)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
225 | }
226 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:224:33: warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
222 | guard let query = jsonDictionary["query"] as? JSONDictionary else {
223 | DispatchQueue.main.async {
224 | completion (searchResults, .notFound)
| |- warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'searchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
225 | }
226 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:217:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
215 | guard let jsonDictionary = jsonDictionary else {
216 | DispatchQueue.main.async {
217 | completion (searchResults, .decodingError)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
218 | }
219 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:217:33: warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
215 | guard let jsonDictionary = jsonDictionary else {
216 | DispatchQueue.main.async {
217 | completion (searchResults, .decodingError)
| |- warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'searchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
218 | }
219 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:210:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
208 | // (also occurs when the request was cancelled programmatically)
209 | DispatchQueue.main.async {
210 | completion (searchResults, error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
211 | }
212 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:210:33: warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
208 | // (also occurs when the request was cancelled programmatically)
209 | DispatchQueue.main.async {
210 | completion (searchResults, error)
| |- warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'searchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
211 | }
212 | return
[27/31] Compiling WikipediaKit Wikipedia.swift
/host/spi-builder-workspace/Sources/WikipediaRandomArticlesBuffer.swift:34:16: warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
32 | class WikipediaRandomArticlesBuffer {
33 |
34 | static var shared: WikipediaRandomArticlesBuffer = {
| |- warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
35 | return WikipediaRandomArticlesBuffer()
36 | }()
/host/spi-builder-workspace/Sources/Wikipedia.swift:42:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Wikipedia' may have shared mutable state; this is an error in the Swift 6 language mode
35 | typealias JSONDictionary = [String:AnyObject]
36 |
37 | public class Wikipedia {
| `- note: class 'Wikipedia' does not conform to the 'Sendable' protocol
38 |
39 | // Public initializer is required if we don’t use the shared singleton
40 | public init() {}
41 |
42 | public static let shared: Wikipedia = {
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Wikipedia' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
43 | return Wikipedia()
44 | }()
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:52:25: warning: capture of 'completion' with non-sendable type '(WikipediaArticlePreview?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
50 | guard let articlePreviews = articlePreviews else {
51 | DispatchQueue.main.async {
52 | completion(nil, language, error)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaArticlePreview?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
53 | }
54 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:52:41: warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
50 | guard let articlePreviews = articlePreviews else {
51 | DispatchQueue.main.async {
52 | completion(nil, language, error)
| `- warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
53 | }
54 | return
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:40:15: note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
38 |
39 |
40 | public struct WikipediaLanguage: Hashable, Equatable {
| `- note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
41 |
42 | public let code: String
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:61:21: warning: capture of 'completion' with non-sendable type '(WikipediaArticlePreview?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
59 | let articlePreview = WikipediaRandomArticlesBuffer.shared.nextArticlePreview()
60 | DispatchQueue.main.async {
61 | completion(articlePreview, language, error)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaArticlePreview?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
62 | }
63 | }
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:61:32: warning: capture of 'articlePreview' with non-sendable type 'WikipediaArticlePreview?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
59 | let articlePreview = WikipediaRandomArticlesBuffer.shared.nextArticlePreview()
60 | DispatchQueue.main.async {
61 | completion(articlePreview, language, error)
| `- warning: capture of 'articlePreview' with non-sendable type 'WikipediaArticlePreview?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
62 | }
63 | }
/host/spi-builder-workspace/Sources/WikipediaArticlePreview.swift:49:14: note: class 'WikipediaArticlePreview' does not conform to the 'Sendable' protocol
47 | }
48 |
49 | public class WikipediaArticlePreview: Hashable, Equatable {
| `- note: class 'WikipediaArticlePreview' does not conform to the 'Sendable' protocol
50 |
51 | public var language: WikipediaLanguage
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:61:48: warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
59 | let articlePreview = WikipediaRandomArticlesBuffer.shared.nextArticlePreview()
60 | DispatchQueue.main.async {
61 | completion(articlePreview, language, error)
| `- warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
62 | }
63 | }
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:40:15: note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
38 |
39 |
40 | public struct WikipediaLanguage: Hashable, Equatable {
| `- note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
41 |
42 | public let code: String
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:110:21: warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
108 | else {
109 | DispatchQueue.main.async {
110 | completion(nil, language, .other(nil))
| |- warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
111 | }
112 | return nil
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:110:37: warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
108 | else {
109 | DispatchQueue.main.async {
110 | completion(nil, language, .other(nil))
| `- warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
111 | }
112 | return nil
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:40:15: note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
38 |
39 |
40 | public struct WikipediaLanguage: Hashable, Equatable {
| `- note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
41 |
42 | public let code: String
/host/spi-builder-workspace/Sources/WikipediaNetworking.swift:39:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'WikipediaNetworking' may have shared mutable state; this is an error in the Swift 6 language mode
33 | #endif
34 |
35 | public class WikipediaNetworking {
| `- note: class 'WikipediaNetworking' does not conform to the 'Sendable' protocol
36 |
37 | public static var appAuthorEmailForAPI = ""
38 |
39 | public static let shared: WikipediaNetworking = {
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'WikipediaNetworking' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
40 | return WikipediaNetworking()
41 | }()
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:120:21: warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
118 | // (also occurs when the request was cancelled programmatically)
119 | DispatchQueue.main.async {
120 | completion (nil, language, error)
| |- warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
121 | }
122 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:120:38: warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
118 | // (also occurs when the request was cancelled programmatically)
119 | DispatchQueue.main.async {
120 | completion (nil, language, error)
| `- warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
121 | }
122 | return
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:40:15: note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
38 |
39 |
40 | public struct WikipediaLanguage: Hashable, Equatable {
| `- note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
41 |
42 | public let code: String
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:127:21: warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
125 | guard let jsonDictionary = jsonDictionary else {
126 | DispatchQueue.main.async {
127 | completion (nil, language, .decodingError)
| |- warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
128 | }
129 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:127:38: warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
125 | guard let jsonDictionary = jsonDictionary else {
126 | DispatchQueue.main.async {
127 | completion (nil, language, .decodingError)
| `- warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
128 | }
129 | return
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:40:15: note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
38 |
39 |
40 | public struct WikipediaLanguage: Hashable, Equatable {
| `- note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
41 |
42 | public let code: String
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:137:21: warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
135 | // there is no “query” key,
136 | // but unfortunately no error message either
137 | completion (nil, language, .notFound)
| |- warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
138 | }
139 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:137:38: warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
135 | // there is no “query” key,
136 | // but unfortunately no error message either
137 | completion (nil, language, .notFound)
| `- warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
138 | }
139 | return
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:40:15: note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
38 |
39 |
40 | public struct WikipediaLanguage: Hashable, Equatable {
| `- note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
41 |
42 | public let code: String
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:145:21: warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
143 | let info = error["info"] as? String {
144 | DispatchQueue.main.async {
145 | completion (nil, language, .apiError(info))
| |- warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
146 | }
147 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:145:38: warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
143 | let info = error["info"] as? String {
144 | DispatchQueue.main.async {
145 | completion (nil, language, .apiError(info))
| `- warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
146 | }
147 | return
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:40:15: note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
38 |
39 |
40 | public struct WikipediaLanguage: Hashable, Equatable {
| `- note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
41 |
42 | public let code: String
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:152:21: warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
150 | guard let pages = query["pages"] as? [JSONDictionary] else {
151 | DispatchQueue.main.async {
152 | completion (nil, language, .notFound)
| |- warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
153 | }
154 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:152:38: warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
150 | guard let pages = query["pages"] as? [JSONDictionary] else {
151 | DispatchQueue.main.async {
152 | completion (nil, language, .notFound)
| `- warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
153 | }
154 | return
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:40:15: note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
38 |
39 |
40 | public struct WikipediaLanguage: Hashable, Equatable {
| `- note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
41 |
42 | public let code: String
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:166:17: warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
164 |
165 | DispatchQueue.main.async {
166 | completion(results, language, error)
| |- warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
167 | }
168 | }
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:166:28: warning: capture of 'results' with non-sendable type '[WikipediaArticlePreview]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
164 |
165 | DispatchQueue.main.async {
166 | completion(results, language, error)
| `- warning: capture of 'results' with non-sendable type '[WikipediaArticlePreview]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
167 | }
168 | }
/host/spi-builder-workspace/Sources/WikipediaArticlePreview.swift:49:14: note: class 'WikipediaArticlePreview' does not conform to the 'Sendable' protocol
47 | }
48 |
49 | public class WikipediaArticlePreview: Hashable, Equatable {
| `- note: class 'WikipediaArticlePreview' does not conform to the 'Sendable' protocol
50 |
51 | public var language: WikipediaLanguage
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:166:37: warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
164 |
165 | DispatchQueue.main.async {
166 | completion(results, language, error)
| `- warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
167 | }
168 | }
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:40:15: note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
38 |
39 |
40 | public struct WikipediaLanguage: Hashable, Equatable {
| `- note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
41 |
42 | public let code: String
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:166:28: warning: reference to captured var 'results' in concurrently-executing code; this is an error in the Swift 6 language mode
164 |
165 | DispatchQueue.main.async {
166 | completion(results, language, error)
| `- warning: reference to captured var 'results' in concurrently-executing code; this is an error in the Swift 6 language mode
167 | }
168 | }
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:65:29: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
63 | if (fullTextSearchResults?.items.count ?? 0) >= (prefixSearchResults?.items.count ?? 0) {
64 | DispatchQueue.main.async {
65 | completion(fullTextSearchResults, error)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
66 | }
67 | } else {
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:65:40: warning: capture of 'fullTextSearchResults' with non-sendable type 'WikipediaSearchResults?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
63 | if (fullTextSearchResults?.items.count ?? 0) >= (prefixSearchResults?.items.count ?? 0) {
64 | DispatchQueue.main.async {
65 | completion(fullTextSearchResults, error)
| `- warning: capture of 'fullTextSearchResults' with non-sendable type 'WikipediaSearchResults?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
66 | }
67 | } else {
/host/spi-builder-workspace/Sources/WikipediaSearchResults.swift:30:14: note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
28 | //
29 |
30 | public class WikipediaSearchResults {
| `- note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
31 |
32 | public var searchMethod = WikipediaSearchMethod.prefix
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:69:29: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
67 | } else {
68 | DispatchQueue.main.async {
69 | completion(prefixSearchResults, nil)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
70 | }
71 | }
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:69:40: warning: capture of 'prefixSearchResults' with non-sendable type 'WikipediaSearchResults?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
67 | } else {
68 | DispatchQueue.main.async {
69 | completion(prefixSearchResults, nil)
| `- warning: capture of 'prefixSearchResults' with non-sendable type 'WikipediaSearchResults?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
70 | }
71 | }
/host/spi-builder-workspace/Sources/WikipediaSearchResults.swift:30:14: note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
28 | //
29 |
30 | public class WikipediaSearchResults {
| `- note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
31 |
32 | public var searchMethod = WikipediaSearchMethod.prefix
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:69:40: warning: reference to captured var 'prefixSearchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
67 | } else {
68 | DispatchQueue.main.async {
69 | completion(prefixSearchResults, nil)
| `- warning: reference to captured var 'prefixSearchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
70 | }
71 | }
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:76:21: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
74 | } else {
75 | DispatchQueue.main.async {
76 | completion(searchResults, error)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
77 | }
78 | }
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:76:32: warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
74 | } else {
75 | DispatchQueue.main.async {
76 | completion(searchResults, error)
| `- warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
77 | }
78 | }
/host/spi-builder-workspace/Sources/WikipediaSearchResults.swift:30:14: note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
28 | //
29 |
30 | public class WikipediaSearchResults {
| `- note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
31 |
32 | public var searchMethod = WikipediaSearchMethod.prefix
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:99:25: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
97 | sr.term == term else {
98 | DispatchQueue.main.async {
99 | completion(nil, .other(nil))
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
100 | }
101 | return nil
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:114:21: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
112 | if cachedSearchResults.items.count > searchResults.items.count {
113 | DispatchQueue.main.async {
114 | completion(cachedSearchResults, nil)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
115 | }
116 | return nil
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:114:32: warning: capture of 'cachedSearchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
112 | if cachedSearchResults.items.count > searchResults.items.count {
113 | DispatchQueue.main.async {
114 | completion(cachedSearchResults, nil)
| `- warning: capture of 'cachedSearchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
115 | }
116 | return nil
/host/spi-builder-workspace/Sources/WikipediaSearchResults.swift:30:14: note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
28 | //
29 |
30 | public class WikipediaSearchResults {
| `- note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
31 |
32 | public var searchMethod = WikipediaSearchMethod.prefix
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:200:21: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
198 | else {
199 | DispatchQueue.main.async {
200 | completion(nil, .other(nil))
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
201 | }
202 | return nil
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:210:21: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
208 | // (also occurs when the request was cancelled programmatically)
209 | DispatchQueue.main.async {
210 | completion (searchResults, error)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
211 | }
212 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:210:33: warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
208 | // (also occurs when the request was cancelled programmatically)
209 | DispatchQueue.main.async {
210 | completion (searchResults, error)
| `- warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
211 | }
212 | return
/host/spi-builder-workspace/Sources/WikipediaSearchResults.swift:30:14: note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
28 | //
29 |
30 | public class WikipediaSearchResults {
| `- note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
31 |
32 | public var searchMethod = WikipediaSearchMethod.prefix
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:210:33: warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
208 | // (also occurs when the request was cancelled programmatically)
209 | DispatchQueue.main.async {
210 | completion (searchResults, error)
| `- warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
211 | }
212 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:217:21: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
215 | guard let jsonDictionary = jsonDictionary else {
216 | DispatchQueue.main.async {
217 | completion (searchResults, .decodingError)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
218 | }
219 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:217:33: warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
215 | guard let jsonDictionary = jsonDictionary else {
216 | DispatchQueue.main.async {
217 | completion (searchResults, .decodingError)
| `- warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
218 | }
219 | return
/host/spi-builder-workspace/Sources/WikipediaSearchResults.swift:30:14: note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
28 | //
29 |
30 | public class WikipediaSearchResults {
| `- note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
31 |
32 | public var searchMethod = WikipediaSearchMethod.prefix
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:217:33: warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
215 | guard let jsonDictionary = jsonDictionary else {
216 | DispatchQueue.main.async {
217 | completion (searchResults, .decodingError)
| `- warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
218 | }
219 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:224:21: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
222 | guard let query = jsonDictionary["query"] as? JSONDictionary else {
223 | DispatchQueue.main.async {
224 | completion (searchResults, .notFound)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
225 | }
226 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:224:33: warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
222 | guard let query = jsonDictionary["query"] as? JSONDictionary else {
223 | DispatchQueue.main.async {
224 | completion (searchResults, .notFound)
| `- warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
225 | }
226 | return
/host/spi-builder-workspace/Sources/WikipediaSearchResults.swift:30:14: note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
28 | //
29 |
30 | public class WikipediaSearchResults {
| `- note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
31 |
32 | public var searchMethod = WikipediaSearchMethod.prefix
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:224:33: warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
222 | guard let query = jsonDictionary["query"] as? JSONDictionary else {
223 | DispatchQueue.main.async {
224 | completion (searchResults, .notFound)
| `- warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
225 | }
226 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:261:25: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
259 |
260 | DispatchQueue.main.async {
261 | completion (searchResults, .notEnoughResults)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
262 | }
263 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:261:37: warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
259 |
260 | DispatchQueue.main.async {
261 | completion (searchResults, .notEnoughResults)
| `- warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
262 | }
263 | return
/host/spi-builder-workspace/Sources/WikipediaSearchResults.swift:30:14: note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
28 | //
29 |
30 | public class WikipediaSearchResults {
| `- note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
31 |
32 | public var searchMethod = WikipediaSearchMethod.prefix
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:261:37: warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
259 |
260 | DispatchQueue.main.async {
261 | completion (searchResults, .notEnoughResults)
| `- warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
262 | }
263 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:269:21: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
267 |
268 | DispatchQueue.main.async {
269 | completion(searchResults, error)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
270 | }
271 |
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:269:32: warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
267 |
268 | DispatchQueue.main.async {
269 | completion(searchResults, error)
| `- warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
270 | }
271 |
/host/spi-builder-workspace/Sources/WikipediaSearchResults.swift:30:14: note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
28 | //
29 |
30 | public class WikipediaSearchResults {
| `- note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
31 |
32 | public var searchMethod = WikipediaSearchMethod.prefix
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:269:32: warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
267 |
268 | DispatchQueue.main.async {
269 | completion(searchResults, error)
| `- warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
270 | }
271 |
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:277:25: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
275 | if searchResults.offset == 0 {
276 | DispatchQueue.main.async {
277 | completion (searchResults, .notFound)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
278 | }
279 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:277:37: warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
275 | if searchResults.offset == 0 {
276 | DispatchQueue.main.async {
277 | completion (searchResults, .notFound)
| `- warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
278 | }
279 | return
/host/spi-builder-workspace/Sources/WikipediaSearchResults.swift:30:14: note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
28 | //
29 |
30 | public class WikipediaSearchResults {
| `- note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
31 |
32 | public var searchMethod = WikipediaSearchMethod.prefix
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:277:37: warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
275 | if searchResults.offset == 0 {
276 | DispatchQueue.main.async {
277 | completion (searchResults, .notFound)
| `- warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
278 | }
279 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:284:25: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
282 | searchResults.canLoadMore = false
283 | DispatchQueue.main.async {
284 | completion (searchResults, error)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
285 | }
286 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:284:37: warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
282 | searchResults.canLoadMore = false
283 | DispatchQueue.main.async {
284 | completion (searchResults, error)
| `- warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
285 | }
286 | return
/host/spi-builder-workspace/Sources/WikipediaSearchResults.swift:30:14: note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
28 | //
29 |
30 | public class WikipediaSearchResults {
| `- note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
31 |
32 | public var searchMethod = WikipediaSearchMethod.prefix
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:284:37: warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
282 | searchResults.canLoadMore = false
283 | DispatchQueue.main.async {
284 | completion (searchResults, error)
| `- warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
285 | }
286 | return
/host/spi-builder-workspace/Sources/Wikipedia.swift:46:28: warning: static property 'sharedFormattingDelegate' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
44 | }()
45 |
46 | public static weak var sharedFormattingDelegate: WikipediaTextFormattingDelegate?
| |- warning: static property 'sharedFormattingDelegate' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'sharedFormattingDelegate' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'sharedFormattingDelegate' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
47 |
48 | let articleCache: WikipediaArticleCache = {
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:110:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
108 | else {
109 | DispatchQueue.main.async {
110 | completion(nil, language, .other(nil))
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
111 | }
112 | return nil
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:110:37: warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
108 | else {
109 | DispatchQueue.main.async {
110 | completion(nil, language, .other(nil))
| |- warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'language' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
111 | }
112 | return nil
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:61:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
59 | let articlePreview = WikipediaRandomArticlesBuffer.shared.nextArticlePreview()
60 | DispatchQueue.main.async {
61 | completion(articlePreview, language, error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
62 | }
63 | }
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:61:48: warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
59 | let articlePreview = WikipediaRandomArticlesBuffer.shared.nextArticlePreview()
60 | DispatchQueue.main.async {
61 | completion(articlePreview, language, error)
| |- warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'language' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
62 | }
63 | }
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:52:25: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
50 | guard let articlePreviews = articlePreviews else {
51 | DispatchQueue.main.async {
52 | completion(nil, language, error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
53 | }
54 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:52:41: warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
50 | guard let articlePreviews = articlePreviews else {
51 | DispatchQueue.main.async {
52 | completion(nil, language, error)
| |- warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'language' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
53 | }
54 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:145:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
143 | let info = error["info"] as? String {
144 | DispatchQueue.main.async {
145 | completion (nil, language, .apiError(info))
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
146 | }
147 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:145:38: warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
143 | let info = error["info"] as? String {
144 | DispatchQueue.main.async {
145 | completion (nil, language, .apiError(info))
| |- warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'language' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
146 | }
147 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:166:17: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
164 |
165 | DispatchQueue.main.async {
166 | completion(results, language, error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
167 | }
168 | }
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:166:28: warning: sending 'results' risks causing data races; this is an error in the Swift 6 language mode
164 |
165 | DispatchQueue.main.async {
166 | completion(results, language, error)
| |- warning: sending 'results' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'results' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
167 | }
168 | }
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:166:37: warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
164 |
165 | DispatchQueue.main.async {
166 | completion(results, language, error)
| |- warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'language' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
167 | }
168 | }
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:152:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
150 | guard let pages = query["pages"] as? [JSONDictionary] else {
151 | DispatchQueue.main.async {
152 | completion (nil, language, .notFound)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
153 | }
154 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:152:38: warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
150 | guard let pages = query["pages"] as? [JSONDictionary] else {
151 | DispatchQueue.main.async {
152 | completion (nil, language, .notFound)
| |- warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'language' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
153 | }
154 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:137:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
135 | // there is no “query” key,
136 | // but unfortunately no error message either
137 | completion (nil, language, .notFound)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
138 | }
139 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:137:38: warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
135 | // there is no “query” key,
136 | // but unfortunately no error message either
137 | completion (nil, language, .notFound)
| |- warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'language' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
138 | }
139 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:127:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
125 | guard let jsonDictionary = jsonDictionary else {
126 | DispatchQueue.main.async {
127 | completion (nil, language, .decodingError)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
128 | }
129 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:127:38: warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
125 | guard let jsonDictionary = jsonDictionary else {
126 | DispatchQueue.main.async {
127 | completion (nil, language, .decodingError)
| |- warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'language' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
128 | }
129 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:120:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
118 | // (also occurs when the request was cancelled programmatically)
119 | DispatchQueue.main.async {
120 | completion (nil, language, error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
121 | }
122 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:120:38: warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
118 | // (also occurs when the request was cancelled programmatically)
119 | DispatchQueue.main.async {
120 | completion (nil, language, error)
| |- warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'language' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
121 | }
122 | return
/host/spi-builder-workspace/Sources/WikipediaNetworking.swift:37:23: warning: static property 'appAuthorEmailForAPI' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
35 | public class WikipediaNetworking {
36 |
37 | public static var appAuthorEmailForAPI = ""
| |- warning: static property 'appAuthorEmailForAPI' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'appAuthorEmailForAPI' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'appAuthorEmailForAPI' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
38 |
39 | public static let shared: WikipediaNetworking = {
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:99:25: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
97 | sr.term == term else {
98 | DispatchQueue.main.async {
99 | completion(nil, .other(nil))
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
100 | }
101 | return nil
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:114:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
112 | if cachedSearchResults.items.count > searchResults.items.count {
113 | DispatchQueue.main.async {
114 | completion(cachedSearchResults, nil)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
115 | }
116 | return nil
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:114:32: warning: sending 'cachedSearchResults' risks causing data races; this is an error in the Swift 6 language mode
112 | if cachedSearchResults.items.count > searchResults.items.count {
113 | DispatchQueue.main.async {
114 | completion(cachedSearchResults, nil)
| |- warning: sending 'cachedSearchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'cachedSearchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
115 | }
116 | return nil
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:200:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
198 | else {
199 | DispatchQueue.main.async {
200 | completion(nil, .other(nil))
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
201 | }
202 | return nil
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:76:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
74 | } else {
75 | DispatchQueue.main.async {
76 | completion(searchResults, error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | }
78 | }
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:76:32: warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
74 | } else {
75 | DispatchQueue.main.async {
76 | completion(searchResults, error)
| |- warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'searchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | }
78 | }
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:65:29: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
63 | if (fullTextSearchResults?.items.count ?? 0) >= (prefixSearchResults?.items.count ?? 0) {
64 | DispatchQueue.main.async {
65 | completion(fullTextSearchResults, error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
66 | }
67 | } else {
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:65:40: warning: sending 'fullTextSearchResults' risks causing data races; this is an error in the Swift 6 language mode
63 | if (fullTextSearchResults?.items.count ?? 0) >= (prefixSearchResults?.items.count ?? 0) {
64 | DispatchQueue.main.async {
65 | completion(fullTextSearchResults, error)
| |- warning: sending 'fullTextSearchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'fullTextSearchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
66 | }
67 | } else {
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:69:29: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
67 | } else {
68 | DispatchQueue.main.async {
69 | completion(prefixSearchResults, nil)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
70 | }
71 | }
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:69:40: warning: sending 'prefixSearchResults' risks causing data races; this is an error in the Swift 6 language mode
67 | } else {
68 | DispatchQueue.main.async {
69 | completion(prefixSearchResults, nil)
| |- warning: sending 'prefixSearchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'prefixSearchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
70 | }
71 | }
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:261:25: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
259 |
260 | DispatchQueue.main.async {
261 | completion (searchResults, .notEnoughResults)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
262 | }
263 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:261:37: warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
259 |
260 | DispatchQueue.main.async {
261 | completion (searchResults, .notEnoughResults)
| |- warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'searchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
262 | }
263 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:269:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
267 |
268 | DispatchQueue.main.async {
269 | completion(searchResults, error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
270 | }
271 |
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:269:32: warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
267 |
268 | DispatchQueue.main.async {
269 | completion(searchResults, error)
| |- warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'searchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
270 | }
271 |
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:277:25: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
275 | if searchResults.offset == 0 {
276 | DispatchQueue.main.async {
277 | completion (searchResults, .notFound)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
278 | }
279 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:277:37: warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
275 | if searchResults.offset == 0 {
276 | DispatchQueue.main.async {
277 | completion (searchResults, .notFound)
| |- warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'searchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
278 | }
279 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:284:25: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
282 | searchResults.canLoadMore = false
283 | DispatchQueue.main.async {
284 | completion (searchResults, error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
285 | }
286 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:284:37: warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
282 | searchResults.canLoadMore = false
283 | DispatchQueue.main.async {
284 | completion (searchResults, error)
| |- warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'searchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
285 | }
286 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:224:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
222 | guard let query = jsonDictionary["query"] as? JSONDictionary else {
223 | DispatchQueue.main.async {
224 | completion (searchResults, .notFound)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
225 | }
226 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:224:33: warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
222 | guard let query = jsonDictionary["query"] as? JSONDictionary else {
223 | DispatchQueue.main.async {
224 | completion (searchResults, .notFound)
| |- warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'searchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
225 | }
226 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:217:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
215 | guard let jsonDictionary = jsonDictionary else {
216 | DispatchQueue.main.async {
217 | completion (searchResults, .decodingError)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
218 | }
219 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:217:33: warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
215 | guard let jsonDictionary = jsonDictionary else {
216 | DispatchQueue.main.async {
217 | completion (searchResults, .decodingError)
| |- warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'searchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
218 | }
219 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:210:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
208 | // (also occurs when the request was cancelled programmatically)
209 | DispatchQueue.main.async {
210 | completion (searchResults, error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
211 | }
212 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:210:33: warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
208 | // (also occurs when the request was cancelled programmatically)
209 | DispatchQueue.main.async {
210 | completion (searchResults, error)
| |- warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'searchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
211 | }
212 | return
[28/31] Compiling WikipediaKit WikipediaArticle.swift
/host/spi-builder-workspace/Sources/WikipediaRandomArticlesBuffer.swift:34:16: warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
32 | class WikipediaRandomArticlesBuffer {
33 |
34 | static var shared: WikipediaRandomArticlesBuffer = {
| |- warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
35 | return WikipediaRandomArticlesBuffer()
36 | }()
/host/spi-builder-workspace/Sources/Wikipedia.swift:42:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Wikipedia' may have shared mutable state; this is an error in the Swift 6 language mode
35 | typealias JSONDictionary = [String:AnyObject]
36 |
37 | public class Wikipedia {
| `- note: class 'Wikipedia' does not conform to the 'Sendable' protocol
38 |
39 | // Public initializer is required if we don’t use the shared singleton
40 | public init() {}
41 |
42 | public static let shared: Wikipedia = {
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'Wikipedia' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
43 | return Wikipedia()
44 | }()
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:52:25: warning: capture of 'completion' with non-sendable type '(WikipediaArticlePreview?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
50 | guard let articlePreviews = articlePreviews else {
51 | DispatchQueue.main.async {
52 | completion(nil, language, error)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaArticlePreview?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
53 | }
54 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:52:41: warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
50 | guard let articlePreviews = articlePreviews else {
51 | DispatchQueue.main.async {
52 | completion(nil, language, error)
| `- warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
53 | }
54 | return
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:40:15: note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
38 |
39 |
40 | public struct WikipediaLanguage: Hashable, Equatable {
| `- note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
41 |
42 | public let code: String
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:61:21: warning: capture of 'completion' with non-sendable type '(WikipediaArticlePreview?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
59 | let articlePreview = WikipediaRandomArticlesBuffer.shared.nextArticlePreview()
60 | DispatchQueue.main.async {
61 | completion(articlePreview, language, error)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaArticlePreview?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
62 | }
63 | }
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:61:32: warning: capture of 'articlePreview' with non-sendable type 'WikipediaArticlePreview?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
59 | let articlePreview = WikipediaRandomArticlesBuffer.shared.nextArticlePreview()
60 | DispatchQueue.main.async {
61 | completion(articlePreview, language, error)
| `- warning: capture of 'articlePreview' with non-sendable type 'WikipediaArticlePreview?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
62 | }
63 | }
/host/spi-builder-workspace/Sources/WikipediaArticlePreview.swift:49:14: note: class 'WikipediaArticlePreview' does not conform to the 'Sendable' protocol
47 | }
48 |
49 | public class WikipediaArticlePreview: Hashable, Equatable {
| `- note: class 'WikipediaArticlePreview' does not conform to the 'Sendable' protocol
50 |
51 | public var language: WikipediaLanguage
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:61:48: warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
59 | let articlePreview = WikipediaRandomArticlesBuffer.shared.nextArticlePreview()
60 | DispatchQueue.main.async {
61 | completion(articlePreview, language, error)
| `- warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
62 | }
63 | }
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:40:15: note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
38 |
39 |
40 | public struct WikipediaLanguage: Hashable, Equatable {
| `- note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
41 |
42 | public let code: String
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:110:21: warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
108 | else {
109 | DispatchQueue.main.async {
110 | completion(nil, language, .other(nil))
| |- warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
111 | }
112 | return nil
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:110:37: warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
108 | else {
109 | DispatchQueue.main.async {
110 | completion(nil, language, .other(nil))
| `- warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
111 | }
112 | return nil
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:40:15: note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
38 |
39 |
40 | public struct WikipediaLanguage: Hashable, Equatable {
| `- note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
41 |
42 | public let code: String
/host/spi-builder-workspace/Sources/WikipediaNetworking.swift:39:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'WikipediaNetworking' may have shared mutable state; this is an error in the Swift 6 language mode
33 | #endif
34 |
35 | public class WikipediaNetworking {
| `- note: class 'WikipediaNetworking' does not conform to the 'Sendable' protocol
36 |
37 | public static var appAuthorEmailForAPI = ""
38 |
39 | public static let shared: WikipediaNetworking = {
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'WikipediaNetworking' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
40 | return WikipediaNetworking()
41 | }()
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:120:21: warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
118 | // (also occurs when the request was cancelled programmatically)
119 | DispatchQueue.main.async {
120 | completion (nil, language, error)
| |- warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
121 | }
122 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:120:38: warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
118 | // (also occurs when the request was cancelled programmatically)
119 | DispatchQueue.main.async {
120 | completion (nil, language, error)
| `- warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
121 | }
122 | return
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:40:15: note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
38 |
39 |
40 | public struct WikipediaLanguage: Hashable, Equatable {
| `- note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
41 |
42 | public let code: String
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:127:21: warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
125 | guard let jsonDictionary = jsonDictionary else {
126 | DispatchQueue.main.async {
127 | completion (nil, language, .decodingError)
| |- warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
128 | }
129 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:127:38: warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
125 | guard let jsonDictionary = jsonDictionary else {
126 | DispatchQueue.main.async {
127 | completion (nil, language, .decodingError)
| `- warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
128 | }
129 | return
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:40:15: note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
38 |
39 |
40 | public struct WikipediaLanguage: Hashable, Equatable {
| `- note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
41 |
42 | public let code: String
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:137:21: warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
135 | // there is no “query” key,
136 | // but unfortunately no error message either
137 | completion (nil, language, .notFound)
| |- warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
138 | }
139 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:137:38: warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
135 | // there is no “query” key,
136 | // but unfortunately no error message either
137 | completion (nil, language, .notFound)
| `- warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
138 | }
139 | return
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:40:15: note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
38 |
39 |
40 | public struct WikipediaLanguage: Hashable, Equatable {
| `- note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
41 |
42 | public let code: String
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:145:21: warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
143 | let info = error["info"] as? String {
144 | DispatchQueue.main.async {
145 | completion (nil, language, .apiError(info))
| |- warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
146 | }
147 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:145:38: warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
143 | let info = error["info"] as? String {
144 | DispatchQueue.main.async {
145 | completion (nil, language, .apiError(info))
| `- warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
146 | }
147 | return
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:40:15: note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
38 |
39 |
40 | public struct WikipediaLanguage: Hashable, Equatable {
| `- note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
41 |
42 | public let code: String
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:152:21: warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
150 | guard let pages = query["pages"] as? [JSONDictionary] else {
151 | DispatchQueue.main.async {
152 | completion (nil, language, .notFound)
| |- warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
153 | }
154 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:152:38: warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
150 | guard let pages = query["pages"] as? [JSONDictionary] else {
151 | DispatchQueue.main.async {
152 | completion (nil, language, .notFound)
| `- warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
153 | }
154 | return
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:40:15: note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
38 |
39 |
40 | public struct WikipediaLanguage: Hashable, Equatable {
| `- note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
41 |
42 | public let code: String
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:166:17: warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
164 |
165 | DispatchQueue.main.async {
166 | completion(results, language, error)
| |- warning: capture of 'completion' with non-sendable type '([WikipediaArticlePreview]?, WikipediaLanguage, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
167 | }
168 | }
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:166:28: warning: capture of 'results' with non-sendable type '[WikipediaArticlePreview]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
164 |
165 | DispatchQueue.main.async {
166 | completion(results, language, error)
| `- warning: capture of 'results' with non-sendable type '[WikipediaArticlePreview]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
167 | }
168 | }
/host/spi-builder-workspace/Sources/WikipediaArticlePreview.swift:49:14: note: class 'WikipediaArticlePreview' does not conform to the 'Sendable' protocol
47 | }
48 |
49 | public class WikipediaArticlePreview: Hashable, Equatable {
| `- note: class 'WikipediaArticlePreview' does not conform to the 'Sendable' protocol
50 |
51 | public var language: WikipediaLanguage
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:166:37: warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
164 |
165 | DispatchQueue.main.async {
166 | completion(results, language, error)
| `- warning: capture of 'language' with non-sendable type 'WikipediaLanguage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
167 | }
168 | }
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:40:15: note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
38 |
39 |
40 | public struct WikipediaLanguage: Hashable, Equatable {
| `- note: consider making struct 'WikipediaLanguage' conform to the 'Sendable' protocol
41 |
42 | public let code: String
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:166:28: warning: reference to captured var 'results' in concurrently-executing code; this is an error in the Swift 6 language mode
164 |
165 | DispatchQueue.main.async {
166 | completion(results, language, error)
| `- warning: reference to captured var 'results' in concurrently-executing code; this is an error in the Swift 6 language mode
167 | }
168 | }
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:65:29: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
63 | if (fullTextSearchResults?.items.count ?? 0) >= (prefixSearchResults?.items.count ?? 0) {
64 | DispatchQueue.main.async {
65 | completion(fullTextSearchResults, error)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
66 | }
67 | } else {
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:65:40: warning: capture of 'fullTextSearchResults' with non-sendable type 'WikipediaSearchResults?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
63 | if (fullTextSearchResults?.items.count ?? 0) >= (prefixSearchResults?.items.count ?? 0) {
64 | DispatchQueue.main.async {
65 | completion(fullTextSearchResults, error)
| `- warning: capture of 'fullTextSearchResults' with non-sendable type 'WikipediaSearchResults?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
66 | }
67 | } else {
/host/spi-builder-workspace/Sources/WikipediaSearchResults.swift:30:14: note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
28 | //
29 |
30 | public class WikipediaSearchResults {
| `- note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
31 |
32 | public var searchMethod = WikipediaSearchMethod.prefix
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:69:29: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
67 | } else {
68 | DispatchQueue.main.async {
69 | completion(prefixSearchResults, nil)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
70 | }
71 | }
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:69:40: warning: capture of 'prefixSearchResults' with non-sendable type 'WikipediaSearchResults?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
67 | } else {
68 | DispatchQueue.main.async {
69 | completion(prefixSearchResults, nil)
| `- warning: capture of 'prefixSearchResults' with non-sendable type 'WikipediaSearchResults?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
70 | }
71 | }
/host/spi-builder-workspace/Sources/WikipediaSearchResults.swift:30:14: note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
28 | //
29 |
30 | public class WikipediaSearchResults {
| `- note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
31 |
32 | public var searchMethod = WikipediaSearchMethod.prefix
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:69:40: warning: reference to captured var 'prefixSearchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
67 | } else {
68 | DispatchQueue.main.async {
69 | completion(prefixSearchResults, nil)
| `- warning: reference to captured var 'prefixSearchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
70 | }
71 | }
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:76:21: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
74 | } else {
75 | DispatchQueue.main.async {
76 | completion(searchResults, error)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
77 | }
78 | }
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:76:32: warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
74 | } else {
75 | DispatchQueue.main.async {
76 | completion(searchResults, error)
| `- warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
77 | }
78 | }
/host/spi-builder-workspace/Sources/WikipediaSearchResults.swift:30:14: note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
28 | //
29 |
30 | public class WikipediaSearchResults {
| `- note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
31 |
32 | public var searchMethod = WikipediaSearchMethod.prefix
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:99:25: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
97 | sr.term == term else {
98 | DispatchQueue.main.async {
99 | completion(nil, .other(nil))
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
100 | }
101 | return nil
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:114:21: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
112 | if cachedSearchResults.items.count > searchResults.items.count {
113 | DispatchQueue.main.async {
114 | completion(cachedSearchResults, nil)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
115 | }
116 | return nil
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:114:32: warning: capture of 'cachedSearchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
112 | if cachedSearchResults.items.count > searchResults.items.count {
113 | DispatchQueue.main.async {
114 | completion(cachedSearchResults, nil)
| `- warning: capture of 'cachedSearchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
115 | }
116 | return nil
/host/spi-builder-workspace/Sources/WikipediaSearchResults.swift:30:14: note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
28 | //
29 |
30 | public class WikipediaSearchResults {
| `- note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
31 |
32 | public var searchMethod = WikipediaSearchMethod.prefix
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:200:21: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
198 | else {
199 | DispatchQueue.main.async {
200 | completion(nil, .other(nil))
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
201 | }
202 | return nil
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:210:21: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
208 | // (also occurs when the request was cancelled programmatically)
209 | DispatchQueue.main.async {
210 | completion (searchResults, error)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
211 | }
212 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:210:33: warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
208 | // (also occurs when the request was cancelled programmatically)
209 | DispatchQueue.main.async {
210 | completion (searchResults, error)
| `- warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
211 | }
212 | return
/host/spi-builder-workspace/Sources/WikipediaSearchResults.swift:30:14: note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
28 | //
29 |
30 | public class WikipediaSearchResults {
| `- note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
31 |
32 | public var searchMethod = WikipediaSearchMethod.prefix
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:210:33: warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
208 | // (also occurs when the request was cancelled programmatically)
209 | DispatchQueue.main.async {
210 | completion (searchResults, error)
| `- warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
211 | }
212 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:217:21: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
215 | guard let jsonDictionary = jsonDictionary else {
216 | DispatchQueue.main.async {
217 | completion (searchResults, .decodingError)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
218 | }
219 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:217:33: warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
215 | guard let jsonDictionary = jsonDictionary else {
216 | DispatchQueue.main.async {
217 | completion (searchResults, .decodingError)
| `- warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
218 | }
219 | return
/host/spi-builder-workspace/Sources/WikipediaSearchResults.swift:30:14: note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
28 | //
29 |
30 | public class WikipediaSearchResults {
| `- note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
31 |
32 | public var searchMethod = WikipediaSearchMethod.prefix
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:217:33: warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
215 | guard let jsonDictionary = jsonDictionary else {
216 | DispatchQueue.main.async {
217 | completion (searchResults, .decodingError)
| `- warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
218 | }
219 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:224:21: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
222 | guard let query = jsonDictionary["query"] as? JSONDictionary else {
223 | DispatchQueue.main.async {
224 | completion (searchResults, .notFound)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
225 | }
226 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:224:33: warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
222 | guard let query = jsonDictionary["query"] as? JSONDictionary else {
223 | DispatchQueue.main.async {
224 | completion (searchResults, .notFound)
| `- warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
225 | }
226 | return
/host/spi-builder-workspace/Sources/WikipediaSearchResults.swift:30:14: note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
28 | //
29 |
30 | public class WikipediaSearchResults {
| `- note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
31 |
32 | public var searchMethod = WikipediaSearchMethod.prefix
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:224:33: warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
222 | guard let query = jsonDictionary["query"] as? JSONDictionary else {
223 | DispatchQueue.main.async {
224 | completion (searchResults, .notFound)
| `- warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
225 | }
226 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:261:25: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
259 |
260 | DispatchQueue.main.async {
261 | completion (searchResults, .notEnoughResults)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
262 | }
263 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:261:37: warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
259 |
260 | DispatchQueue.main.async {
261 | completion (searchResults, .notEnoughResults)
| `- warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
262 | }
263 | return
/host/spi-builder-workspace/Sources/WikipediaSearchResults.swift:30:14: note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
28 | //
29 |
30 | public class WikipediaSearchResults {
| `- note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
31 |
32 | public var searchMethod = WikipediaSearchMethod.prefix
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:261:37: warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
259 |
260 | DispatchQueue.main.async {
261 | completion (searchResults, .notEnoughResults)
| `- warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
262 | }
263 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:269:21: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
267 |
268 | DispatchQueue.main.async {
269 | completion(searchResults, error)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
270 | }
271 |
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:269:32: warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
267 |
268 | DispatchQueue.main.async {
269 | completion(searchResults, error)
| `- warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
270 | }
271 |
/host/spi-builder-workspace/Sources/WikipediaSearchResults.swift:30:14: note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
28 | //
29 |
30 | public class WikipediaSearchResults {
| `- note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
31 |
32 | public var searchMethod = WikipediaSearchMethod.prefix
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:269:32: warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
267 |
268 | DispatchQueue.main.async {
269 | completion(searchResults, error)
| `- warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
270 | }
271 |
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:277:25: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
275 | if searchResults.offset == 0 {
276 | DispatchQueue.main.async {
277 | completion (searchResults, .notFound)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
278 | }
279 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:277:37: warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
275 | if searchResults.offset == 0 {
276 | DispatchQueue.main.async {
277 | completion (searchResults, .notFound)
| `- warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
278 | }
279 | return
/host/spi-builder-workspace/Sources/WikipediaSearchResults.swift:30:14: note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
28 | //
29 |
30 | public class WikipediaSearchResults {
| `- note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
31 |
32 | public var searchMethod = WikipediaSearchMethod.prefix
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:277:37: warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
275 | if searchResults.offset == 0 {
276 | DispatchQueue.main.async {
277 | completion (searchResults, .notFound)
| `- warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
278 | }
279 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:284:25: warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
282 | searchResults.canLoadMore = false
283 | DispatchQueue.main.async {
284 | completion (searchResults, error)
| |- warning: capture of 'completion' with non-sendable type '(WikipediaSearchResults?, WikipediaError?) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
285 | }
286 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:284:37: warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
282 | searchResults.canLoadMore = false
283 | DispatchQueue.main.async {
284 | completion (searchResults, error)
| `- warning: capture of 'searchResults' with non-sendable type 'WikipediaSearchResults' in a `@Sendable` closure; this is an error in the Swift 6 language mode
285 | }
286 | return
/host/spi-builder-workspace/Sources/WikipediaSearchResults.swift:30:14: note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
28 | //
29 |
30 | public class WikipediaSearchResults {
| `- note: class 'WikipediaSearchResults' does not conform to the 'Sendable' protocol
31 |
32 | public var searchMethod = WikipediaSearchMethod.prefix
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:284:37: warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
282 | searchResults.canLoadMore = false
283 | DispatchQueue.main.async {
284 | completion (searchResults, error)
| `- warning: reference to captured var 'searchResults' in concurrently-executing code; this is an error in the Swift 6 language mode
285 | }
286 | return
/host/spi-builder-workspace/Sources/Wikipedia.swift:46:28: warning: static property 'sharedFormattingDelegate' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
44 | }()
45 |
46 | public static weak var sharedFormattingDelegate: WikipediaTextFormattingDelegate?
| |- warning: static property 'sharedFormattingDelegate' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'sharedFormattingDelegate' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'sharedFormattingDelegate' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
47 |
48 | let articleCache: WikipediaArticleCache = {
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:110:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
108 | else {
109 | DispatchQueue.main.async {
110 | completion(nil, language, .other(nil))
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
111 | }
112 | return nil
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:110:37: warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
108 | else {
109 | DispatchQueue.main.async {
110 | completion(nil, language, .other(nil))
| |- warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'language' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
111 | }
112 | return nil
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:61:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
59 | let articlePreview = WikipediaRandomArticlesBuffer.shared.nextArticlePreview()
60 | DispatchQueue.main.async {
61 | completion(articlePreview, language, error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
62 | }
63 | }
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:61:48: warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
59 | let articlePreview = WikipediaRandomArticlesBuffer.shared.nextArticlePreview()
60 | DispatchQueue.main.async {
61 | completion(articlePreview, language, error)
| |- warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'language' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
62 | }
63 | }
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:52:25: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
50 | guard let articlePreviews = articlePreviews else {
51 | DispatchQueue.main.async {
52 | completion(nil, language, error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
53 | }
54 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:52:41: warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
50 | guard let articlePreviews = articlePreviews else {
51 | DispatchQueue.main.async {
52 | completion(nil, language, error)
| |- warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'language' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
53 | }
54 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:145:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
143 | let info = error["info"] as? String {
144 | DispatchQueue.main.async {
145 | completion (nil, language, .apiError(info))
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
146 | }
147 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:145:38: warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
143 | let info = error["info"] as? String {
144 | DispatchQueue.main.async {
145 | completion (nil, language, .apiError(info))
| |- warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'language' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
146 | }
147 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:166:17: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
164 |
165 | DispatchQueue.main.async {
166 | completion(results, language, error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
167 | }
168 | }
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:166:28: warning: sending 'results' risks causing data races; this is an error in the Swift 6 language mode
164 |
165 | DispatchQueue.main.async {
166 | completion(results, language, error)
| |- warning: sending 'results' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'results' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
167 | }
168 | }
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:166:37: warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
164 |
165 | DispatchQueue.main.async {
166 | completion(results, language, error)
| |- warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'language' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
167 | }
168 | }
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:152:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
150 | guard let pages = query["pages"] as? [JSONDictionary] else {
151 | DispatchQueue.main.async {
152 | completion (nil, language, .notFound)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
153 | }
154 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:152:38: warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
150 | guard let pages = query["pages"] as? [JSONDictionary] else {
151 | DispatchQueue.main.async {
152 | completion (nil, language, .notFound)
| |- warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'language' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
153 | }
154 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:137:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
135 | // there is no “query” key,
136 | // but unfortunately no error message either
137 | completion (nil, language, .notFound)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
138 | }
139 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:137:38: warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
135 | // there is no “query” key,
136 | // but unfortunately no error message either
137 | completion (nil, language, .notFound)
| |- warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'language' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
138 | }
139 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:127:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
125 | guard let jsonDictionary = jsonDictionary else {
126 | DispatchQueue.main.async {
127 | completion (nil, language, .decodingError)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
128 | }
129 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:127:38: warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
125 | guard let jsonDictionary = jsonDictionary else {
126 | DispatchQueue.main.async {
127 | completion (nil, language, .decodingError)
| |- warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'language' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
128 | }
129 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:120:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
118 | // (also occurs when the request was cancelled programmatically)
119 | DispatchQueue.main.async {
120 | completion (nil, language, error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
121 | }
122 | return
/host/spi-builder-workspace/Sources/Wikipedia+RandomArticles.swift:120:38: warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
118 | // (also occurs when the request was cancelled programmatically)
119 | DispatchQueue.main.async {
120 | completion (nil, language, error)
| |- warning: sending 'language' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'language' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
121 | }
122 | return
/host/spi-builder-workspace/Sources/WikipediaNetworking.swift:37:23: warning: static property 'appAuthorEmailForAPI' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
35 | public class WikipediaNetworking {
36 |
37 | public static var appAuthorEmailForAPI = ""
| |- warning: static property 'appAuthorEmailForAPI' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'appAuthorEmailForAPI' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'appAuthorEmailForAPI' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
38 |
39 | public static let shared: WikipediaNetworking = {
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:99:25: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
97 | sr.term == term else {
98 | DispatchQueue.main.async {
99 | completion(nil, .other(nil))
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
100 | }
101 | return nil
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:114:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
112 | if cachedSearchResults.items.count > searchResults.items.count {
113 | DispatchQueue.main.async {
114 | completion(cachedSearchResults, nil)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
115 | }
116 | return nil
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:114:32: warning: sending 'cachedSearchResults' risks causing data races; this is an error in the Swift 6 language mode
112 | if cachedSearchResults.items.count > searchResults.items.count {
113 | DispatchQueue.main.async {
114 | completion(cachedSearchResults, nil)
| |- warning: sending 'cachedSearchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'cachedSearchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
115 | }
116 | return nil
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:200:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
198 | else {
199 | DispatchQueue.main.async {
200 | completion(nil, .other(nil))
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
201 | }
202 | return nil
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:76:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
74 | } else {
75 | DispatchQueue.main.async {
76 | completion(searchResults, error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | }
78 | }
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:76:32: warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
74 | } else {
75 | DispatchQueue.main.async {
76 | completion(searchResults, error)
| |- warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'searchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | }
78 | }
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:65:29: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
63 | if (fullTextSearchResults?.items.count ?? 0) >= (prefixSearchResults?.items.count ?? 0) {
64 | DispatchQueue.main.async {
65 | completion(fullTextSearchResults, error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
66 | }
67 | } else {
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:65:40: warning: sending 'fullTextSearchResults' risks causing data races; this is an error in the Swift 6 language mode
63 | if (fullTextSearchResults?.items.count ?? 0) >= (prefixSearchResults?.items.count ?? 0) {
64 | DispatchQueue.main.async {
65 | completion(fullTextSearchResults, error)
| |- warning: sending 'fullTextSearchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'fullTextSearchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
66 | }
67 | } else {
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:69:29: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
67 | } else {
68 | DispatchQueue.main.async {
69 | completion(prefixSearchResults, nil)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
70 | }
71 | }
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:69:40: warning: sending 'prefixSearchResults' risks causing data races; this is an error in the Swift 6 language mode
67 | } else {
68 | DispatchQueue.main.async {
69 | completion(prefixSearchResults, nil)
| |- warning: sending 'prefixSearchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'prefixSearchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
70 | }
71 | }
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:261:25: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
259 |
260 | DispatchQueue.main.async {
261 | completion (searchResults, .notEnoughResults)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
262 | }
263 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:261:37: warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
259 |
260 | DispatchQueue.main.async {
261 | completion (searchResults, .notEnoughResults)
| |- warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'searchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
262 | }
263 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:269:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
267 |
268 | DispatchQueue.main.async {
269 | completion(searchResults, error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
270 | }
271 |
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:269:32: warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
267 |
268 | DispatchQueue.main.async {
269 | completion(searchResults, error)
| |- warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'searchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
270 | }
271 |
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:277:25: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
275 | if searchResults.offset == 0 {
276 | DispatchQueue.main.async {
277 | completion (searchResults, .notFound)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
278 | }
279 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:277:37: warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
275 | if searchResults.offset == 0 {
276 | DispatchQueue.main.async {
277 | completion (searchResults, .notFound)
| |- warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'searchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
278 | }
279 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:284:25: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
282 | searchResults.canLoadMore = false
283 | DispatchQueue.main.async {
284 | completion (searchResults, error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
285 | }
286 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:284:37: warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
282 | searchResults.canLoadMore = false
283 | DispatchQueue.main.async {
284 | completion (searchResults, error)
| |- warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'searchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
285 | }
286 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:224:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
222 | guard let query = jsonDictionary["query"] as? JSONDictionary else {
223 | DispatchQueue.main.async {
224 | completion (searchResults, .notFound)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
225 | }
226 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:224:33: warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
222 | guard let query = jsonDictionary["query"] as? JSONDictionary else {
223 | DispatchQueue.main.async {
224 | completion (searchResults, .notFound)
| |- warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'searchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
225 | }
226 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:217:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
215 | guard let jsonDictionary = jsonDictionary else {
216 | DispatchQueue.main.async {
217 | completion (searchResults, .decodingError)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
218 | }
219 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:217:33: warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
215 | guard let jsonDictionary = jsonDictionary else {
216 | DispatchQueue.main.async {
217 | completion (searchResults, .decodingError)
| |- warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'searchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
218 | }
219 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:210:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
208 | // (also occurs when the request was cancelled programmatically)
209 | DispatchQueue.main.async {
210 | completion (searchResults, error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
211 | }
212 | return
/host/spi-builder-workspace/Sources/Wikipedia+Search.swift:210:33: warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
208 | // (also occurs when the request was cancelled programmatically)
209 | DispatchQueue.main.async {
210 | completion (searchResults, error)
| |- warning: sending 'searchResults' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'searchResults' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
211 | }
212 | return
[29/31] Compiling WikipediaKit WikipediaNamespace.swift
/host/spi-builder-workspace/Sources/WikipediaNetworking.swift:37:23: warning: static property 'appAuthorEmailForAPI' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
35 | public class WikipediaNetworking {
36 |
37 | public static var appAuthorEmailForAPI = ""
| |- warning: static property 'appAuthorEmailForAPI' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'appAuthorEmailForAPI' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'appAuthorEmailForAPI' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
38 |
39 | public static let shared: WikipediaNetworking = {
/host/spi-builder-workspace/Sources/WikipediaNetworking.swift:39:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'WikipediaNetworking' may have shared mutable state; this is an error in the Swift 6 language mode
33 | #endif
34 |
35 | public class WikipediaNetworking {
| `- note: class 'WikipediaNetworking' does not conform to the 'Sendable' protocol
36 |
37 | public static var appAuthorEmailForAPI = ""
38 |
39 | public static let shared: WikipediaNetworking = {
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'WikipediaNetworking' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
40 | return WikipediaNetworking()
41 | }()
/host/spi-builder-workspace/Sources/WikipediaNetworking.swift:43:23: warning: static property 'debugPerformance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
41 | }()
42 |
43 | public static var debugPerformance = false
| |- warning: static property 'debugPerformance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'debugPerformance' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'debugPerformance' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
44 |
45 | private func logMessage(_ message: String) {
/host/spi-builder-workspace/Sources/WikipediaNetworking.swift:53:28: warning: static property 'sharedActivityIndicatorDelegate' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
51 | }
52 |
53 | public static weak var sharedActivityIndicatorDelegate: WikipediaNetworkingActivityDelegate?
| |- warning: static property 'sharedActivityIndicatorDelegate' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'sharedActivityIndicatorDelegate' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'sharedActivityIndicatorDelegate' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
54 |
55 | let session = URLSession(configuration: URLSessionConfiguration.default)
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:122:23: warning: static property 'preferredChineseVariant' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
120 | static var supportedChineseLocaleVariants = ["cn", "hk", "mo", "my", "sg", "tw"]
121 |
122 | public static var preferredChineseVariant: String? = {
| |- warning: static property 'preferredChineseVariant' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'preferredChineseVariant' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'preferredChineseVariant' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
123 |
124 | let preferredLanguages = Locale.preferredLanguages
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:103:23: warning: static property 'systemLanguage' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
101 | }()
102 |
103 | public static var systemLanguage: WikipediaLanguage = {
| |- warning: static property 'systemLanguage' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'systemLanguage' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'systemLanguage' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
104 | return WikipediaLanguage(systemLanguageCode)
105 | }()
/host/spi-builder-workspace/Sources/WikipediaNetworking.swift:88:17: warning: capture of 'self' with non-sendable type 'WikipediaNetworking' in a `@Sendable` closure; this is an error in the Swift 6 language mode
33 | #endif
34 |
35 | public class WikipediaNetworking {
| `- note: class 'WikipediaNetworking' does not conform to the 'Sendable' protocol
36 |
37 | public static var appAuthorEmailForAPI = ""
:
86 | let endNetworkingTime = Date()
87 | let totalNetworkingTime: Double = endNetworkingTime.timeIntervalSince(startTime)
88 | self.logMessage("\(totalNetworkingTime) seconds for network retrieval")
| `- warning: capture of 'self' with non-sendable type 'WikipediaNetworking' in a `@Sendable` closure; this is an error in the Swift 6 language mode
89 | #endif
90 |
/host/spi-builder-workspace/Sources/WikipediaNetworking.swift:113:17: warning: capture of 'completion' with non-sendable type '(JSONDictionary?, WikipediaError?) -> ()' (aka '(Optional<Dictionary<String, AnyObject>>, Optional<WikipediaError>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
111 | }
112 | }
113 | completion(nil, wikipediaError)
| |- warning: capture of 'completion' with non-sendable type '(JSONDictionary?, WikipediaError?) -> ()' (aka '(Optional<Dictionary<String, AnyObject>>, Optional<WikipediaError>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
114 | return
115 | }
[30/31] Compiling WikipediaKit WikipediaNetworking.swift
/host/spi-builder-workspace/Sources/WikipediaNetworking.swift:37:23: warning: static property 'appAuthorEmailForAPI' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
35 | public class WikipediaNetworking {
36 |
37 | public static var appAuthorEmailForAPI = ""
| |- warning: static property 'appAuthorEmailForAPI' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'appAuthorEmailForAPI' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'appAuthorEmailForAPI' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
38 |
39 | public static let shared: WikipediaNetworking = {
/host/spi-builder-workspace/Sources/WikipediaNetworking.swift:39:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'WikipediaNetworking' may have shared mutable state; this is an error in the Swift 6 language mode
33 | #endif
34 |
35 | public class WikipediaNetworking {
| `- note: class 'WikipediaNetworking' does not conform to the 'Sendable' protocol
36 |
37 | public static var appAuthorEmailForAPI = ""
38 |
39 | public static let shared: WikipediaNetworking = {
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'WikipediaNetworking' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
40 | return WikipediaNetworking()
41 | }()
/host/spi-builder-workspace/Sources/WikipediaNetworking.swift:43:23: warning: static property 'debugPerformance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
41 | }()
42 |
43 | public static var debugPerformance = false
| |- warning: static property 'debugPerformance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'debugPerformance' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'debugPerformance' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
44 |
45 | private func logMessage(_ message: String) {
/host/spi-builder-workspace/Sources/WikipediaNetworking.swift:53:28: warning: static property 'sharedActivityIndicatorDelegate' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
51 | }
52 |
53 | public static weak var sharedActivityIndicatorDelegate: WikipediaNetworkingActivityDelegate?
| |- warning: static property 'sharedActivityIndicatorDelegate' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'sharedActivityIndicatorDelegate' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'sharedActivityIndicatorDelegate' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
54 |
55 | let session = URLSession(configuration: URLSessionConfiguration.default)
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:122:23: warning: static property 'preferredChineseVariant' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
120 | static var supportedChineseLocaleVariants = ["cn", "hk", "mo", "my", "sg", "tw"]
121 |
122 | public static var preferredChineseVariant: String? = {
| |- warning: static property 'preferredChineseVariant' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'preferredChineseVariant' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'preferredChineseVariant' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
123 |
124 | let preferredLanguages = Locale.preferredLanguages
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:103:23: warning: static property 'systemLanguage' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
101 | }()
102 |
103 | public static var systemLanguage: WikipediaLanguage = {
| |- warning: static property 'systemLanguage' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'systemLanguage' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'systemLanguage' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
104 | return WikipediaLanguage(systemLanguageCode)
105 | }()
/host/spi-builder-workspace/Sources/WikipediaNetworking.swift:88:17: warning: capture of 'self' with non-sendable type 'WikipediaNetworking' in a `@Sendable` closure; this is an error in the Swift 6 language mode
33 | #endif
34 |
35 | public class WikipediaNetworking {
| `- note: class 'WikipediaNetworking' does not conform to the 'Sendable' protocol
36 |
37 | public static var appAuthorEmailForAPI = ""
:
86 | let endNetworkingTime = Date()
87 | let totalNetworkingTime: Double = endNetworkingTime.timeIntervalSince(startTime)
88 | self.logMessage("\(totalNetworkingTime) seconds for network retrieval")
| `- warning: capture of 'self' with non-sendable type 'WikipediaNetworking' in a `@Sendable` closure; this is an error in the Swift 6 language mode
89 | #endif
90 |
/host/spi-builder-workspace/Sources/WikipediaNetworking.swift:113:17: warning: capture of 'completion' with non-sendable type '(JSONDictionary?, WikipediaError?) -> ()' (aka '(Optional<Dictionary<String, AnyObject>>, Optional<WikipediaError>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
111 | }
112 | }
113 | completion(nil, wikipediaError)
| |- warning: capture of 'completion' with non-sendable type '(JSONDictionary?, WikipediaError?) -> ()' (aka '(Optional<Dictionary<String, AnyObject>>, Optional<WikipediaError>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
114 | return
115 | }
[31/31] Compiling WikipediaKit WikipediaNetworkingActivityDelegate.swift
/host/spi-builder-workspace/Sources/WikipediaNetworking.swift:37:23: warning: static property 'appAuthorEmailForAPI' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
35 | public class WikipediaNetworking {
36 |
37 | public static var appAuthorEmailForAPI = ""
| |- warning: static property 'appAuthorEmailForAPI' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'appAuthorEmailForAPI' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'appAuthorEmailForAPI' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
38 |
39 | public static let shared: WikipediaNetworking = {
/host/spi-builder-workspace/Sources/WikipediaNetworking.swift:39:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'WikipediaNetworking' may have shared mutable state; this is an error in the Swift 6 language mode
33 | #endif
34 |
35 | public class WikipediaNetworking {
| `- note: class 'WikipediaNetworking' does not conform to the 'Sendable' protocol
36 |
37 | public static var appAuthorEmailForAPI = ""
38 |
39 | public static let shared: WikipediaNetworking = {
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'WikipediaNetworking' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
40 | return WikipediaNetworking()
41 | }()
/host/spi-builder-workspace/Sources/WikipediaNetworking.swift:43:23: warning: static property 'debugPerformance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
41 | }()
42 |
43 | public static var debugPerformance = false
| |- warning: static property 'debugPerformance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'debugPerformance' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'debugPerformance' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
44 |
45 | private func logMessage(_ message: String) {
/host/spi-builder-workspace/Sources/WikipediaNetworking.swift:53:28: warning: static property 'sharedActivityIndicatorDelegate' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
51 | }
52 |
53 | public static weak var sharedActivityIndicatorDelegate: WikipediaNetworkingActivityDelegate?
| |- warning: static property 'sharedActivityIndicatorDelegate' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'sharedActivityIndicatorDelegate' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'sharedActivityIndicatorDelegate' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
54 |
55 | let session = URLSession(configuration: URLSessionConfiguration.default)
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:122:23: warning: static property 'preferredChineseVariant' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
120 | static var supportedChineseLocaleVariants = ["cn", "hk", "mo", "my", "sg", "tw"]
121 |
122 | public static var preferredChineseVariant: String? = {
| |- warning: static property 'preferredChineseVariant' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'preferredChineseVariant' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'preferredChineseVariant' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
123 |
124 | let preferredLanguages = Locale.preferredLanguages
/host/spi-builder-workspace/Sources/WikipediaLanguage.swift:103:23: warning: static property 'systemLanguage' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
101 | }()
102 |
103 | public static var systemLanguage: WikipediaLanguage = {
| |- warning: static property 'systemLanguage' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'systemLanguage' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'systemLanguage' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
104 | return WikipediaLanguage(systemLanguageCode)
105 | }()
/host/spi-builder-workspace/Sources/WikipediaNetworking.swift:88:17: warning: capture of 'self' with non-sendable type 'WikipediaNetworking' in a `@Sendable` closure; this is an error in the Swift 6 language mode
33 | #endif
34 |
35 | public class WikipediaNetworking {
| `- note: class 'WikipediaNetworking' does not conform to the 'Sendable' protocol
36 |
37 | public static var appAuthorEmailForAPI = ""
:
86 | let endNetworkingTime = Date()
87 | let totalNetworkingTime: Double = endNetworkingTime.timeIntervalSince(startTime)
88 | self.logMessage("\(totalNetworkingTime) seconds for network retrieval")
| `- warning: capture of 'self' with non-sendable type 'WikipediaNetworking' in a `@Sendable` closure; this is an error in the Swift 6 language mode
89 | #endif
90 |
/host/spi-builder-workspace/Sources/WikipediaNetworking.swift:113:17: warning: capture of 'completion' with non-sendable type '(JSONDictionary?, WikipediaError?) -> ()' (aka '(Optional<Dictionary<String, AnyObject>>, Optional<WikipediaError>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
111 | }
112 | }
113 | completion(nil, wikipediaError)
| |- warning: capture of 'completion' with non-sendable type '(JSONDictionary?, WikipediaError?) -> ()' (aka '(Optional<Dictionary<String, AnyObject>>, Optional<WikipediaError>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
114 | return
115 | }
Build complete! (10.68s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "WikipediaKit",
"name" : "WikipediaKit",
"path" : "/host/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "12.0"
},
{
"name" : "macos",
"version" : "10.12"
},
{
"name" : "watchos",
"version" : "3.0"
},
{
"name" : "tvos",
"version" : "12.0"
}
],
"products" : [
{
"name" : "WikipediaKit",
"targets" : [
"WikipediaKit"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "WikipediaKitTests",
"module_type" : "SwiftTarget",
"name" : "WikipediaKitTests",
"path" : "Tests/WikipediaKitTests",
"sources" : [
"WikipediaKitTests.swift"
],
"target_dependencies" : [
"WikipediaKit"
],
"type" : "test"
},
{
"c99name" : "WikipediaKit",
"module_type" : "SwiftTarget",
"name" : "WikipediaKit",
"path" : "Sources",
"product_memberships" : [
"WikipediaKit"
],
"sources" : [
"String+Wikipedia.swift",
"URL+Wikipedia.swift",
"Wikipedia+Article.swift",
"Wikipedia+ArticleSummary.swift",
"Wikipedia+Featured.swift",
"Wikipedia+ImageMeta.swift",
"Wikipedia+Languages.swift",
"Wikipedia+NearbySearch.swift",
"Wikipedia+RandomArticles.swift",
"Wikipedia+Search.swift",
"Wikipedia.swift",
"WikipediaArticle.swift",
"WikipediaArticleCache.swift",
"WikipediaArticleLanguageLink.swift",
"WikipediaArticlePreview.swift",
"WikipediaError.swift",
"WikipediaFeatured.swift",
"WikipediaImage.swift",
"WikipediaLanguage.swift",
"WikipediaNamespace.swift",
"WikipediaNetworking.swift",
"WikipediaNetworkingActivityDelegate.swift",
"WikipediaRandomArticlesBuffer.swift",
"WikipediaSearchMethod.swift",
"WikipediaSearchResults.swift",
"WikipediaSearchResultsCache.swift",
"WikipediaTOCItem.swift",
"WikipediaTextFormattingDelegate.swift"
],
"type" : "library"
}
],
"tools_version" : "5.1"
}
basic-6.0-latest: Pulling from finestructure/spi-images
Digest: sha256:47d26c99ca4f1ac0a332c85fd5b13ff4390e72115219984a57a68fe9d1063a05
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.0-latest
Done.