Build Information
Failed to build JavApi⁴Swift, reference main (2d0658), with Swift 6.3 for Linux on 20 Sep 2026 10:55:06 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-53886770-0":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:basic-6.3-latest swift build --triple x86_64-unknown-linux-gnu 2>&1Build Log
130 | fm.createFile(atPath: path, contents: nil)
| `- warning: result of call to 'createFile(atPath:contents:attributes:)' is unused [#no-usage]
131 | }
132 | guard let fh = FileHandle(forWritingAtPath: path) else {
/host/spi-builder-workspace/Sources/JavApi/util/logging/FileHandler.swift:155:12: warning: result of call to 'createFile(atPath:contents:attributes:)' is unused [#no-usage]
153 | let fm = FileManager.default
154 | if !fm.fileExists(atPath: path) {
155 | fm.createFile(atPath: path, contents: nil)
| `- warning: result of call to 'createFile(atPath:contents:attributes:)' is unused [#no-usage]
156 | }
157 | guard let fh = FileHandle(forWritingAtPath: path) else {
[1279/1407] Compiling JavApi SimpleFormatter.swift
/host/spi-builder-workspace/Sources/JavApi/util/logging/FileHandler.swift:130:12: warning: result of call to 'createFile(atPath:contents:attributes:)' is unused [#no-usage]
128 | let fm = FileManager.default
129 | if !fm.fileExists(atPath: path) {
130 | fm.createFile(atPath: path, contents: nil)
| `- warning: result of call to 'createFile(atPath:contents:attributes:)' is unused [#no-usage]
131 | }
132 | guard let fh = FileHandle(forWritingAtPath: path) else {
/host/spi-builder-workspace/Sources/JavApi/util/logging/FileHandler.swift:155:12: warning: result of call to 'createFile(atPath:contents:attributes:)' is unused [#no-usage]
153 | let fm = FileManager.default
154 | if !fm.fileExists(atPath: path) {
155 | fm.createFile(atPath: path, contents: nil)
| `- warning: result of call to 'createFile(atPath:contents:attributes:)' is unused [#no-usage]
156 | }
157 | guard let fh = FileHandle(forWritingAtPath: path) else {
[1280/1407] Compiling JavApi BigDecimal.swift
[1281/1407] Compiling JavApi BigInteger+Codable.swift
[1282/1407] Compiling JavApi BigInteger+Swiftify.swift
[1283/1407] Compiling JavApi BigInteger.swift
[1284/1407] Compiling JavApi Decimal+BigInteger.swift
[1285/1407] Compiling JavApi Decimal+Java.swift
[1286/1407] Compiling JavApi MathContext.swift
[1287/1407] Compiling JavApi RoundingMode.swift
[1288/1407] Compiling JavApi _BitLevel.swift
[1289/1407] Compiling JavApi _Conversion.swift
[1290/1407] Compiling JavApi _Division.swift
[1291/1407] Compiling JavApi _Elementary.swift
[1292/1407] Compiling JavApi _Logical.swift
[1293/1407] Compiling JavApi _Multiplication.swift
[1294/1407] Compiling JavApi _Primality.swift
[1295/1407] Compiling JavApi java.math.swift
[1296/1407] Compiling JavApi BindException.swift
[1297/1407] Compiling JavApi ConnectException.swift
[1298/1407] Compiling JavApi ContentHandler.swift
[1299/1407] Compiling JavApi ContentHandlerFactory.swift
[1300/1407] Compiling JavApi DatagramPacket.swift
[1301/1407] Compiling JavApi DatagramSocket.swift
[1302/1407] Compiling JavApi DatagramSocketImpl.swift
[1303/1407] Compiling JavApi FileNameMap.swift
[1304/1407] Compiling JavApi HttpRetryException.swift
[1305/1407] Compiling JavApi SocketHandler.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1306/1407] Compiling JavApi StreamHandler.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1307/1407] Compiling JavApi XMLFormatter.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1308/1407] Compiling JavApi java.util.logging.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1309/1407] Compiling JavApi RandomGenerator.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1310/1407] Compiling JavApi RandomGeneratorFactory.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1311/1407] Compiling JavApi java.util.random.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1312/1407] Compiling JavApi MatchResult.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1313/1407] Compiling JavApi Matcher.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1314/1407] Compiling JavApi Pattern.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1315/1407] Compiling JavApi PatternSyntaxException.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1316/1407] Compiling JavApi java.util.regex.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1317/1407] Compiling JavApi _DynamicLoader.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1318/1407] Compiling JavApi Collector.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1319/1407] Compiling JavApi DoubleStream.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1320/1407] Compiling JavApi Gatherer.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1321/1407] Compiling JavApi Gatherers.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1322/1407] Compiling JavApi IntStream.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1323/1407] Compiling JavApi LongStream.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1324/1407] Compiling JavApi Stream.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1325/1407] Compiling JavApi StreamSupport.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1326/1407] Compiling JavApi java.util.stream.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1327/1407] Compiling JavApi Adler32+Swiftify.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1328/1407] Compiling JavApi Adler32.swift
/host/spi-builder-workspace/Sources/JavApi/util/stream/DoubleStream.swift:201:76: error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
199 | if _isParallel {
200 | let elements = Array(_makeSequence())
201 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.DoubleConsumer' (aka 'java.util.function.AnyConsumer<Double>') in a '@Sendable' closure [#SendableClosureCaptures]
202 | } else {
203 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:42: error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| |- error: capture of 'mapper' with non-Sendable type '(T) -> R' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Gatherers.swift:195:49: error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
170 | /// - mapper: The function to apply to each element.
171 | /// - Since: Java 22
172 | public static func mapConcurrent<T, R>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
173 | _ parallelism: Int,
174 | _ mapper: @escaping (T) -> R
:
193 |
194 | DispatchQueue.concurrentPerform(iterations: n) { i in
195 | (resultPtr + i).initialize(to: mapper(buffer[i]))
| `- error: capture of 'buffer' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
196 | }
197 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/IntStream.swift:230:76: error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
228 | if _isParallel {
229 | let elements = Array(_makeSequence())
230 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.IntConsumer' (aka 'java.util.function.AnyConsumer<Int>') in a '@Sendable' closure [#SendableClosureCaptures]
231 | } else {
232 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/LongStream.swift:221:76: error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
219 | if _isParallel {
220 | let elements = Array(_makeSequence())
221 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in action.accept(elements[i]) }
| `- error: capture of 'action' with non-Sendable type 'java.util.function.LongConsumer' (aka 'java.util.function.AnyConsumer<Int64>') in a '@Sendable' closure [#SendableClosureCaptures]
222 | } else {
223 | for element in _makeSequence() { action.accept(element) }
/host/spi-builder-workspace/Sources/JavApi/util/function/Consumer.swift:41:17: note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
39 | extension java.util.function {
40 | /// A concrete ``Consumer`` that wraps a Swift closure.
41 | public struct AnyConsumer<T>: java.util.function.Consumer {
| `- note: consider making generic struct 'AnyConsumer' conform to the 'Sendable' protocol
42 | private let _accept: (T) -> Void
43 |
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
270 | ///
271 | /// - Since: Java 8
272 | public func forEach(_ action: some java.util.function.Consumer<T>) {
| `- note: consider making generic parameter 'some java.util.function.Consumer<T>' conform to the 'Sendable' protocol
273 | #if os(WASI)
274 | for element in _makeSequence() { action.accept(element) }
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'action' with non-Sendable type 'some java.util.function.Consumer<T>' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:25: error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
36 | ///
37 | /// - Since: Java 8
38 | public final class Stream<T>: @unchecked Sendable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
39 |
40 | // The source is a lazy factory: evaluated once per terminal operation.
:
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- error: capture of 'elements' with non-Sendable type '[T]' in a '@Sendable' closure [#SendableClosureCaptures]
280 | }
281 | } else {
/host/spi-builder-workspace/Sources/JavApi/util/stream/Stream.swift:279:11: warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
277 | let elements = Array(_makeSequence())
278 | DispatchQueue.concurrentPerform(iterations: elements.count) { i in
279 | action.accept(elements[i])
| `- warning: capture of non-Sendable type '(some java.util.function.Consumer<T>).Type' in an isolated closure [#SendableMetatypes]
280 | }
281 | } else {
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[1329/1407] Compiling JavApi ParsePosition.swift
[1330/1407] Compiling JavApi RuleBasedCollator.swift
[1331/1407] Compiling JavApi SimpleDateFormat.swift
[1332/1407] Compiling JavApi StringCharacterIterator.swift
[1333/1407] Compiling JavApi java.text.swift
[1334/1407] Compiling JavApi Clock.swift
[1335/1407] Compiling JavApi ClockIdentifierName.swift
[1336/1407] Compiling JavApi Instant+AnyDate.swift
[1337/1407] Compiling JavApi Instant+Codable.swift
[1338/1407] Compiling JavApi Instant+Comparable.swift
[1339/1407] Compiling JavApi Instant+CustomDebugStringConvertible.swift
[1340/1407] Compiling JavApi Instant+CustomPlaygroundDisplayConvertible.swift
[1341/1407] Compiling JavApi Instant+CustomReflectable.swift
[1342/1407] Compiling JavApi Instant+CustomStringConvertible.swift
[1343/1407] Compiling JavApi Instant+Equatable.swift
[1344/1407] Compiling JavApi Instant+Hashable.swift
[1345/1407] Compiling JavApi Instant.swift
[1346/1407] Compiling JavApi IntegerExtension.swift
[1347/1407] Compiling JavApi LocalDate.swift
[1348/1407] Compiling JavApi LocalDateTime.swift
[1349/1407] Compiling JavApi LocalTime.swift
[1350/1407] Compiling JavApi Period.swift
[1351/1407] Compiling JavApi ZonedDateTime.swift
[1352/1407] Compiling JavApi java.time.swift
[1353/1407] Compiling JavApi SimpleTimeZone.swift
[1354/1407] Compiling JavApi SortedMap.swift
[1355/1407] Compiling JavApi SortedSet.swift
[1356/1407] Compiling JavApi Spliterator.swift
[1357/1407] Compiling JavApi Stack+AnyObject.swift
[1358/1407] Compiling JavApi Stack+Struct.swift
[1359/1407] Compiling JavApi Stack+Swiftify.swift
[1360/1407] Compiling JavApi Stack.swift
[1361/1407] Compiling JavApi StringJoiner+Swiftify.swift
[1362/1407] Compiling JavApi StringJoiner.swift
[1363/1407] Compiling JavApi StringTokenizer+Swiftify.swift
[1364/1407] Compiling JavApi StringTokenizer.swift
[1365/1407] Compiling JavApi TimeZone.swift
[1366/1407] Compiling JavApi Timer.swift
[1367/1407] Compiling JavApi TimerTask.swift
[1368/1407] Compiling JavApi TreeMap+Swiftify.swift
[1369/1407] Compiling JavApi TreeMap.swift
[1370/1407] Compiling JavApi TreeSet+Equatable.swift
[1371/1407] Compiling JavApi TreeSet+Swiftify.swift
[1372/1407] Compiling JavApi TreeSet.swift
[1373/1407] Compiling JavApi UUID+Java.swift
[1374/1407] Compiling JavApi UnknownFormatConversionException.swift
[1375/1407] Compiling JavApi UnknownFormatFlagsException.swift
[1376/1407] Compiling JavApi Vector+AnyObject.swift
[1377/1407] Compiling JavApi CRC32+Swiftify.swift
[1378/1407] Compiling JavApi CRC32.swift
[1379/1407] Compiling JavApi CRC32C+Swiftify.swift
[1380/1407] Compiling JavApi CRC32C.swift
[1381/1407] Compiling JavApi CheckedInputStream.swift
[1382/1407] Compiling JavApi CheckedOutputStream.swift
[1383/1407] Compiling JavApi Checksum+Swiftify.swift
[1384/1407] Compiling JavApi Checksum.swift
[1385/1407] Compiling JavApi DataFormatException.swift
[1386/1407] Compiling JavApi Deflater.swift
[1387/1407] Compiling JavApi DeflaterInputStream.swift
[1388/1407] Compiling JavApi DeflaterOutputStream.swift
[1389/1407] Compiling JavApi GZIPInputStream.swift
[1390/1407] Compiling JavApi GZIPOutputStream.swift
[1391/1407] Compiling JavApi Inflater.swift
[1392/1407] Compiling JavApi InflaterInputStream.swift
[1393/1407] Compiling JavApi InflaterOutputStream.swift
[1394/1407] Compiling JavApi ZipConstants.swift
[1395/1407] Compiling JavApi ZipEntry.swift
[1396/1407] Compiling JavApi ZipException.swift
[1397/1407] Compiling JavApi ZipFile.swift
[1398/1407] Compiling JavApi ZipInputStream.swift
[1399/1407] Compiling JavApi ZipOutputStream.swift
[1400/1407] Compiling JavApi java.util.zip.swift
BUILD FAILURE 6.3 linux