Build Information
Successful build of discord, reference 0.1.3-beta (7d24b2
), with Swift 6.0 for macOS (SPM) on 30 Nov 2024 03:07:32 UTC.
Swift 6 data race errors: 31
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Build Log
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
60 |
61 | /// Returns a `Color` with its value set to `0x000001`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:62:23: warning: static property 'black' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
60 |
61 | /// Returns a `Color` with its value set to `0x000001`.
62 | public static let black = Color(value: 0x000001)
| |- warning: static property 'black' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'black' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
63 |
64 | /// Returns a `Color` with its value set to `0xffffff`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:65:23: warning: static property 'white' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
63 |
64 | /// Returns a `Color` with its value set to `0xffffff`.
65 | public static let white = Color(value: 0xffffff)
| |- warning: static property 'white' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'white' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
66 |
67 | /// Returns a `Color` with its value set to `0xa6a6a6`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:68:23: warning: static property 'gray' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
66 |
67 | /// Returns a `Color` with its value set to `0xa6a6a6`.
68 | public static let gray = Color(value: 0xa6a6a6)
| |- warning: static property 'gray' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'gray' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
69 |
70 | /// Returns a `Color` with its value set to `0x2f3136`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:71:23: warning: static property 'darkTheme' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
69 |
70 | /// Returns a `Color` with its value set to `0x2f3136`.
71 | public static let darkTheme = Color(value: 0x2f3136)
| |- warning: static property 'darkTheme' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'darkTheme' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
72 |
73 | /// Returns a `Color` with its value set to `0x008080`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:74:23: warning: static property 'teal' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
72 |
73 | /// Returns a `Color` with its value set to `0x008080`.
74 | public static let teal = Color(value: 0x008080)
| |- warning: static property 'teal' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'teal' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
75 |
76 | /// Returns a random `Color`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Channel.swift:203:29: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
201 | public func triggerTyping(while: (() async -> Void)? = nil) async throws {
202 | if let closure = `while` {
203 | let task = Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
204 | while true {
205 | do { try Task.checkCancellation() }
206 | catch { break }
207 | try await bot!.http.triggerTypingIndicator(channelId: id)
| `- note: closure captures 'self' which is accessible to code in the current task
208 |
209 | // The delay isn't 10s because once it hits the 10s mark, the "is typing"
[1793/1805] Compiling Discord Color.swift
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:59:23: warning: static property 'allowedMentions' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
57 |
58 | /// The global allowed mentions.
59 | public static var allowedMentions = AllowedMentions.default
| |- warning: static property 'allowedMentions' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'allowedMentions' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'allowedMentions' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
60 |
61 | /// Controls what will/won't be cached.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:29:23: warning: static property 'blurple' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
29 | public static let blurple = Color(value: 0x5865f2)
| |- warning: static property 'blurple' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'blurple' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 |
31 | /// Returns a `Color` with its value set to `0xeb459e`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:32:23: warning: static property 'fuchsia' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
30 |
31 | /// Returns a `Color` with its value set to `0xeb459e`.
32 | public static let fuchsia = Color(value: 0xeb459e)
| |- warning: static property 'fuchsia' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'fuchsia' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
33 |
34 | /// Returns a `Color` with its value set to `0xfc0303`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:35:23: warning: static property 'red' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
33 |
34 | /// Returns a `Color` with its value set to `0xfc0303`.
35 | public static let red = Color(value: 0xfc0303)
| |- warning: static property 'red' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'red' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 |
37 | /// Returns a `Color` with its value set to `0xff992b`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:38:23: warning: static property 'orange' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
36 |
37 | /// Returns a `Color` with its value set to `0xff992b`.
38 | public static let orange = Color(value: 0xff992b)
| |- warning: static property 'orange' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'orange' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
39 |
40 | /// Returns a `Color` with its value set to `0xffdc2b`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:41:23: warning: static property 'yellow' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
39 |
40 | /// Returns a `Color` with its value set to `0xffdc2b`.
41 | public static let yellow = Color(value: 0xffdc2b)
| |- warning: static property 'yellow' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'yellow' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
42 |
43 | /// Returns a `Color` with its value set to `0x2bff32`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:44:23: warning: static property 'green' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
42 |
43 | /// Returns a `Color` with its value set to `0x2bff32`.
44 | public static let green = Color(value: 0x2bff32)
| |- warning: static property 'green' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'green' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
45 |
46 | /// Returns a `Color` with its value set to `0x026105`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:47:23: warning: static property 'darkGreen' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
45 |
46 | /// Returns a `Color` with its value set to `0x026105`.
47 | public static let darkGreen = Color(value: 0x026105)
| |- warning: static property 'darkGreen' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'darkGreen' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
48 |
49 | /// Returns a `Color` with its value set to `0x36b1d6`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:50:23: warning: static property 'skyBlue' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
48 |
49 | /// Returns a `Color` with its value set to `0x36b1d6`.
50 | public static let skyBlue = Color(value: 0x36b1d6)
| |- warning: static property 'skyBlue' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'skyBlue' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
51 |
52 | /// Returns a `Color` with its value set to `0x1021e3`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:53:23: warning: static property 'darkBlue' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
51 |
52 | /// Returns a `Color` with its value set to `0x1021e3`.
53 | public static let darkBlue = Color(value: 0x1021e3)
| |- warning: static property 'darkBlue' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'darkBlue' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
54 |
55 | /// Returns a `Color` with its value set to `0x8f44f2`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:56:23: warning: static property 'purple' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
54 |
55 | /// Returns a `Color` with its value set to `0x8f44f2`.
56 | public static let purple = Color(value: 0x8f44f2)
| |- warning: static property 'purple' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'purple' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
57 |
58 | /// Returns a `Color` with its value set to `0xfca7f0`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:59:23: warning: static property 'pink' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
57 |
58 | /// Returns a `Color` with its value set to `0xfca7f0`.
59 | public static let pink = Color(value: 0xfca7f0)
| |- warning: static property 'pink' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'pink' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
60 |
61 | /// Returns a `Color` with its value set to `0x000001`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:62:23: warning: static property 'black' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
60 |
61 | /// Returns a `Color` with its value set to `0x000001`.
62 | public static let black = Color(value: 0x000001)
| |- warning: static property 'black' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'black' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
63 |
64 | /// Returns a `Color` with its value set to `0xffffff`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:65:23: warning: static property 'white' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
63 |
64 | /// Returns a `Color` with its value set to `0xffffff`.
65 | public static let white = Color(value: 0xffffff)
| |- warning: static property 'white' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'white' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
66 |
67 | /// Returns a `Color` with its value set to `0xa6a6a6`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:68:23: warning: static property 'gray' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
66 |
67 | /// Returns a `Color` with its value set to `0xa6a6a6`.
68 | public static let gray = Color(value: 0xa6a6a6)
| |- warning: static property 'gray' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'gray' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
69 |
70 | /// Returns a `Color` with its value set to `0x2f3136`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:71:23: warning: static property 'darkTheme' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
69 |
70 | /// Returns a `Color` with its value set to `0x2f3136`.
71 | public static let darkTheme = Color(value: 0x2f3136)
| |- warning: static property 'darkTheme' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'darkTheme' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
72 |
73 | /// Returns a `Color` with its value set to `0x008080`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:74:23: warning: static property 'teal' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
72 |
73 | /// Returns a `Color` with its value set to `0x008080`.
74 | public static let teal = Color(value: 0x008080)
| |- warning: static property 'teal' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'teal' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
75 |
76 | /// Returns a random `Color`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Channel.swift:203:29: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
201 | public func triggerTyping(while: (() async -> Void)? = nil) async throws {
202 | if let closure = `while` {
203 | let task = Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
204 | while true {
205 | do { try Task.checkCancellation() }
206 | catch { break }
207 | try await bot!.http.triggerTypingIndicator(channelId: id)
| `- note: closure captures 'self' which is accessible to code in the current task
208 |
209 | // The delay isn't 10s because once it hits the 10s mark, the "is typing"
[1794/1805] Emitting module Discord
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:59:23: warning: static property 'allowedMentions' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
57 |
58 | /// The global allowed mentions.
59 | public static var allowedMentions = AllowedMentions.default
| |- warning: static property 'allowedMentions' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'allowedMentions' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'allowedMentions' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
60 |
61 | /// Controls what will/won't be cached.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Message.swift:846:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
820 |
821 | /// Represents what mentions are allowed in a message.
822 | public struct AllowedMentions {
| `- note: consider making struct 'AllowedMentions' conform to the 'Sendable' protocol
823 |
824 | /// If users can be mentioned in a message.
:
844 |
845 | /// An `AllowedMentions` object with only `users` and `repliedUser` enabled.
846 | public static let `default` = AllowedMentions(users: true, roles: false, repliedUser: true, everyone: false)
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
847 |
848 | /// An `AllowedMentions` object with everything disabled.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:663:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
655 |
656 | /// Represents what the bot is permitted to cache.
657 | public struct CacheManager {
| `- note: consider making struct 'CacheManager' conform to the 'Sendable' protocol
658 |
659 | /// Has all caching capabilities enabled and a max message cache size of 10,000.
:
661 |
662 | /// Has all caching capabilities enabled and a max message cache size of 1,500.
663 | public static let `default` = CacheManager(messages: 1500, users: true, members: true)
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
664 |
665 | /// Has `users` caching capabilities disabled and a max message cache size of 500.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:660:23: warning: static property 'scaled' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
655 |
656 | /// Represents what the bot is permitted to cache.
657 | public struct CacheManager {
| `- note: consider making struct 'CacheManager' conform to the 'Sendable' protocol
658 |
659 | /// Has all caching capabilities enabled and a max message cache size of 10,000.
660 | public static let scaled = CacheManager(messages: 10_000, users: true, members: true)
| |- warning: static property 'scaled' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'scaled' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
661 |
662 | /// Has all caching capabilities enabled and a max message cache size of 1,500.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:666:23: warning: static property 'limited' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
655 |
656 | /// Represents what the bot is permitted to cache.
657 | public struct CacheManager {
| `- note: consider making struct 'CacheManager' conform to the 'Sendable' protocol
658 |
659 | /// Has all caching capabilities enabled and a max message cache size of 10,000.
:
664 |
665 | /// Has `users` caching capabilities disabled and a max message cache size of 500.
666 | public static let limited = CacheManager(messages: 500, users: false, members: true)
| |- warning: static property 'limited' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'limited' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
667 |
668 | /// Has all caching capabilities disabled and a max message cache size of 100.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:669:23: warning: static property 'restricted' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
655 |
656 | /// Represents what the bot is permitted to cache.
657 | public struct CacheManager {
| `- note: consider making struct 'CacheManager' conform to the 'Sendable' protocol
658 |
659 | /// Has all caching capabilities enabled and a max message cache size of 10,000.
:
667 |
668 | /// Has all caching capabilities disabled and a max message cache size of 100.
669 | public static let restricted = CacheManager(messages: 100, users: false, members: false)
| |- warning: static property 'restricted' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'restricted' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
670 |
671 | /// Has all caching capabilities disabled and a max message cache size of 0.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:672:23: warning: static property 'none' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
655 |
656 | /// Represents what the bot is permitted to cache.
657 | public struct CacheManager {
| `- note: consider making struct 'CacheManager' conform to the 'Sendable' protocol
658 |
659 | /// Has all caching capabilities enabled and a max message cache size of 10,000.
:
670 |
671 | /// Has all caching capabilities disabled and a max message cache size of 0.
672 | public static let none = CacheManager(messages: 0, users: false, members: false)
| |- warning: static property 'none' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'none' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
673 |
674 | /// The amount of messages that are allowed to be cached.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:29:23: warning: static property 'blurple' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
29 | public static let blurple = Color(value: 0x5865f2)
| |- warning: static property 'blurple' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'blurple' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 |
31 | /// Returns a `Color` with its value set to `0xeb459e`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:32:23: warning: static property 'fuchsia' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
30 |
31 | /// Returns a `Color` with its value set to `0xeb459e`.
32 | public static let fuchsia = Color(value: 0xeb459e)
| |- warning: static property 'fuchsia' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'fuchsia' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
33 |
34 | /// Returns a `Color` with its value set to `0xfc0303`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:35:23: warning: static property 'red' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
33 |
34 | /// Returns a `Color` with its value set to `0xfc0303`.
35 | public static let red = Color(value: 0xfc0303)
| |- warning: static property 'red' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'red' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 |
37 | /// Returns a `Color` with its value set to `0xff992b`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:38:23: warning: static property 'orange' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
36 |
37 | /// Returns a `Color` with its value set to `0xff992b`.
38 | public static let orange = Color(value: 0xff992b)
| |- warning: static property 'orange' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'orange' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
39 |
40 | /// Returns a `Color` with its value set to `0xffdc2b`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:41:23: warning: static property 'yellow' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
39 |
40 | /// Returns a `Color` with its value set to `0xffdc2b`.
41 | public static let yellow = Color(value: 0xffdc2b)
| |- warning: static property 'yellow' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'yellow' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
42 |
43 | /// Returns a `Color` with its value set to `0x2bff32`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:44:23: warning: static property 'green' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
42 |
43 | /// Returns a `Color` with its value set to `0x2bff32`.
44 | public static let green = Color(value: 0x2bff32)
| |- warning: static property 'green' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'green' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
45 |
46 | /// Returns a `Color` with its value set to `0x026105`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:47:23: warning: static property 'darkGreen' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
45 |
46 | /// Returns a `Color` with its value set to `0x026105`.
47 | public static let darkGreen = Color(value: 0x026105)
| |- warning: static property 'darkGreen' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'darkGreen' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
48 |
49 | /// Returns a `Color` with its value set to `0x36b1d6`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:50:23: warning: static property 'skyBlue' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
48 |
49 | /// Returns a `Color` with its value set to `0x36b1d6`.
50 | public static let skyBlue = Color(value: 0x36b1d6)
| |- warning: static property 'skyBlue' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'skyBlue' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
51 |
52 | /// Returns a `Color` with its value set to `0x1021e3`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:53:23: warning: static property 'darkBlue' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
51 |
52 | /// Returns a `Color` with its value set to `0x1021e3`.
53 | public static let darkBlue = Color(value: 0x1021e3)
| |- warning: static property 'darkBlue' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'darkBlue' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
54 |
55 | /// Returns a `Color` with its value set to `0x8f44f2`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:56:23: warning: static property 'purple' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
54 |
55 | /// Returns a `Color` with its value set to `0x8f44f2`.
56 | public static let purple = Color(value: 0x8f44f2)
| |- warning: static property 'purple' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'purple' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
57 |
58 | /// Returns a `Color` with its value set to `0xfca7f0`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:59:23: warning: static property 'pink' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
57 |
58 | /// Returns a `Color` with its value set to `0xfca7f0`.
59 | public static let pink = Color(value: 0xfca7f0)
| |- warning: static property 'pink' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'pink' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
60 |
61 | /// Returns a `Color` with its value set to `0x000001`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:62:23: warning: static property 'black' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
60 |
61 | /// Returns a `Color` with its value set to `0x000001`.
62 | public static let black = Color(value: 0x000001)
| |- warning: static property 'black' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'black' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
63 |
64 | /// Returns a `Color` with its value set to `0xffffff`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:65:23: warning: static property 'white' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
63 |
64 | /// Returns a `Color` with its value set to `0xffffff`.
65 | public static let white = Color(value: 0xffffff)
| |- warning: static property 'white' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'white' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
66 |
67 | /// Returns a `Color` with its value set to `0xa6a6a6`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:68:23: warning: static property 'gray' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
66 |
67 | /// Returns a `Color` with its value set to `0xa6a6a6`.
68 | public static let gray = Color(value: 0xa6a6a6)
| |- warning: static property 'gray' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'gray' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
69 |
70 | /// Returns a `Color` with its value set to `0x2f3136`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:71:23: warning: static property 'darkTheme' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
69 |
70 | /// Returns a `Color` with its value set to `0x2f3136`.
71 | public static let darkTheme = Color(value: 0x2f3136)
| |- warning: static property 'darkTheme' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'darkTheme' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
72 |
73 | /// Returns a `Color` with its value set to `0x008080`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Color.swift:74:23: warning: static property 'teal' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents a color on Discord.
26 | public struct Color : Hashable {
| `- note: consider making struct 'Color' conform to the 'Sendable' protocol
27 |
28 | /// Returns a `Color` with its value set to `0x5865f2`.
:
72 |
73 | /// Returns a `Color` with its value set to `0x008080`.
74 | public static let teal = Color(value: 0x008080)
| |- warning: static property 'teal' is not concurrency-safe because non-'Sendable' type 'Color' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'teal' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
75 |
76 | /// Returns a random `Color`.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Emoji.swift:91:16: warning: static property 'regex' is not concurrency-safe because non-'Sendable' type 'Regex<Substring>' may have shared mutable state; this is an error in the Swift 6 language mode
89 | private let guildId: Snowflake
90 |
91 | static let regex = #/<a?:.+?:[0-9]{17,20}>/#
| |- warning: static property 'regex' is not concurrency-safe because non-'Sendable' type 'Regex<Substring>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'regex' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
92 |
93 | // Hashable
_StringProcessing.Regex:2:15: note: generic struct 'Regex' does not conform to the 'Sendable' protocol
1 | @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
2 | public struct Regex<Output> : RegexComponent {
| `- note: generic struct 'Regex' does not conform to the 'Sendable' protocol
3 | public var regex: Regex<Output> { get }
4 | @available(iOS 16.0, tvOS 16.0, watchOS 9.0, macOS 13.0, *)
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Permissions.swift:178:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'Permissions' may have shared mutable state; this is an error in the Swift 6 language mode
141 |
142 | /// Represents the permissions for a channel, user, or guild.
143 | public class Permissions {
| `- note: class 'Permissions' does not conform to the 'Sendable' protocol
144 |
145 | /// The bitset value for the permissions that are enabled/disabled.
:
176 | /// - `sendVoiceMessages`
177 | /// - `requestToSpeak`
178 | public static let `default` = Permissions(enable: [
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'Permissions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
179 | .viewChannel,
180 | .createInstantInvite,
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Intents.swift:189:23: warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'Set<Intents>' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents Discords events that are dispatched.
26 | public enum Intents : Int, CaseIterable {
| `- note: consider making enum 'Intents' conform to the 'Sendable' protocol
27 |
28 | /// Enabling this intent allows the following events to be dispatched:
:
187 |
188 | /// Enables all intents.
189 | public static let all = Set<Intents>().union(Intents.allCases)
| |- warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'Set<Intents>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'all' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
190 |
191 | /// All intents enabled except ``dmTyping``, ``guildMessageTyping``, and ``guildPresences``.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Intents.swift:192:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'Set<Intents>' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents Discords events that are dispatched.
26 | public enum Intents : Int, CaseIterable {
| `- note: consider making enum 'Intents' conform to the 'Sendable' protocol
27 |
28 | /// Enabling this intent allows the following events to be dispatched:
:
190 |
191 | /// All intents enabled except ``dmTyping``, ``guildMessageTyping``, and ``guildPresences``.
192 | public static let `default` = Intents.all(except: [.dmTyping, .guildMessageTyping, .guildPresences])
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'Set<Intents>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
193 |
194 | /// Disables all intents.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Intents.swift:195:23: warning: static property 'none' is not concurrency-safe because non-'Sendable' type 'Set<Intents>' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | /// Represents Discords events that are dispatched.
26 | public enum Intents : Int, CaseIterable {
| `- note: consider making enum 'Intents' conform to the 'Sendable' protocol
27 |
28 | /// Enabling this intent allows the following events to be dispatched:
:
193 |
194 | /// Disables all intents.
195 | public static let none = Set<Intents>()
| |- warning: static property 'none' is not concurrency-safe because non-'Sendable' type 'Set<Intents>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'none' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
196 |
197 | /// Enables all intents except the ones specified.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Message.swift:843:23: warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
820 |
821 | /// Represents what mentions are allowed in a message.
822 | public struct AllowedMentions {
| `- note: consider making struct 'AllowedMentions' conform to the 'Sendable' protocol
823 |
824 | /// If users can be mentioned in a message.
:
841 |
842 | /// An `AllowedMentions` object with everything enabled.
843 | public static let all = AllowedMentions(users: true, roles: true, repliedUser: true, everyone: true)
| |- warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'all' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
844 |
845 | /// An `AllowedMentions` object with only `users` and `repliedUser` enabled.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Message.swift:849:23: warning: static property 'none' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
820 |
821 | /// Represents what mentions are allowed in a message.
822 | public struct AllowedMentions {
| `- note: consider making struct 'AllowedMentions' conform to the 'Sendable' protocol
823 |
824 | /// If users can be mentioned in a message.
:
847 |
848 | /// An `AllowedMentions` object with everything disabled.
849 | public static let none = AllowedMentions(users: false, roles: false, repliedUser: false, everyone: false)
| |- warning: static property 'none' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'none' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
850 |
851 | /// Initializes a new allowed mentions object.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Permissions.swift:203:23: warning: static property 'none' is not concurrency-safe because non-'Sendable' type 'Permissions' may have shared mutable state; this is an error in the Swift 6 language mode
141 |
142 | /// Represents the permissions for a channel, user, or guild.
143 | public class Permissions {
| `- note: class 'Permissions' does not conform to the 'Sendable' protocol
144 |
145 | /// The bitset value for the permissions that are enabled/disabled.
:
201 |
202 | /// Returns a permissions object with all permissions disabled.
203 | public static let none = Permissions(permsValue: 0)
| |- warning: static property 'none' is not concurrency-safe because non-'Sendable' type 'Permissions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'none' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
204 |
205 | init(permsValue: Int) {
[1795/1805] Compiling Discord Member.swift
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:59:23: warning: static property 'allowedMentions' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
57 |
58 | /// The global allowed mentions.
59 | public static var allowedMentions = AllowedMentions.default
| |- warning: static property 'allowedMentions' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'allowedMentions' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'allowedMentions' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
60 |
61 | /// Controls what will/won't be cached.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Message.swift:843:23: warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
820 |
821 | /// Represents what mentions are allowed in a message.
822 | public struct AllowedMentions {
| `- note: consider making struct 'AllowedMentions' conform to the 'Sendable' protocol
823 |
824 | /// If users can be mentioned in a message.
:
841 |
842 | /// An `AllowedMentions` object with everything enabled.
843 | public static let all = AllowedMentions(users: true, roles: true, repliedUser: true, everyone: true)
| |- warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'all' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
844 |
845 | /// An `AllowedMentions` object with only `users` and `repliedUser` enabled.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Message.swift:846:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
820 |
821 | /// Represents what mentions are allowed in a message.
822 | public struct AllowedMentions {
| `- note: consider making struct 'AllowedMentions' conform to the 'Sendable' protocol
823 |
824 | /// If users can be mentioned in a message.
:
844 |
845 | /// An `AllowedMentions` object with only `users` and `repliedUser` enabled.
846 | public static let `default` = AllowedMentions(users: true, roles: false, repliedUser: true, everyone: false)
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
847 |
848 | /// An `AllowedMentions` object with everything disabled.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Message.swift:849:23: warning: static property 'none' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
820 |
821 | /// Represents what mentions are allowed in a message.
822 | public struct AllowedMentions {
| `- note: consider making struct 'AllowedMentions' conform to the 'Sendable' protocol
823 |
824 | /// If users can be mentioned in a message.
:
847 |
848 | /// An `AllowedMentions` object with everything disabled.
849 | public static let none = AllowedMentions(users: false, roles: false, repliedUser: false, everyone: false)
| |- warning: static property 'none' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'none' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
850 |
851 | /// Initializes a new allowed mentions object.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Emoji.swift:91:16: warning: static property 'regex' is not concurrency-safe because non-'Sendable' type 'Regex<Substring>' may have shared mutable state; this is an error in the Swift 6 language mode
89 | private let guildId: Snowflake
90 |
91 | static let regex = #/<a?:.+?:[0-9]{17,20}>/#
| |- warning: static property 'regex' is not concurrency-safe because non-'Sendable' type 'Regex<Substring>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'regex' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
92 |
93 | // Hashable
_StringProcessing.Regex:2:15: note: generic struct 'Regex' does not conform to the 'Sendable' protocol
1 | @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
2 | public struct Regex<Output> : RegexComponent {
| `- note: generic struct 'Regex' does not conform to the 'Sendable' protocol
3 | public var regex: Regex<Output> { get }
4 | @available(iOS 16.0, tvOS 16.0, watchOS 9.0, macOS 13.0, *)
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Message.swift:487:17: warning: capture of 'self' with non-sendable type 'Message' in a `@Sendable` closure; this is an error in the Swift 6 language mode
26 |
27 | /// Represents a Discord message.
28 | public class Message : Object, Hashable, Updateable {
| `- note: class 'Message' does not conform to the 'Sendable' protocol
29 |
30 | /// ID of the message.
:
485 | DispatchQueue.main.async {
486 | self.cacheExpireTimer = .scheduledTimer(withTimeInterval: self.expires.timeIntervalSince(.now), repeats: false, block: { [self] _ in
487 | bot!.removeCachedMessage(id)
| `- warning: capture of 'self' with non-sendable type 'Message' in a `@Sendable` closure; this is an error in the Swift 6 language mode
488 | })
489 | }
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Message.swift:486:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
484 | cacheExpireTimer?.invalidate()
485 | DispatchQueue.main.async {
486 | self.cacheExpireTimer = .scheduledTimer(withTimeInterval: self.expires.timeIntervalSince(.now), repeats: false, block: { [self] _ in
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
487 | bot!.removeCachedMessage(id)
488 | })
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Message.swift:452:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
450 | let after = max(0, after)
451 | if after > 0 {
452 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
453 | await sleep(Int(after * 1000))
454 |
455 | // Since this is in the background, the message could have possibly been already deleted, so silently
456 | // ignore any errors that may arise.
457 | try? await self.bot!.http.deleteMessage(channelId: self.channel.id, messageId: self.id, reason: reason)
| `- note: closure captures 'self' which is accessible to code in the current task
458 | }
459 | } else {
[1796/1805] Compiling Discord Message.swift
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:59:23: warning: static property 'allowedMentions' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
57 |
58 | /// The global allowed mentions.
59 | public static var allowedMentions = AllowedMentions.default
| |- warning: static property 'allowedMentions' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'allowedMentions' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'allowedMentions' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
60 |
61 | /// Controls what will/won't be cached.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Message.swift:843:23: warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
820 |
821 | /// Represents what mentions are allowed in a message.
822 | public struct AllowedMentions {
| `- note: consider making struct 'AllowedMentions' conform to the 'Sendable' protocol
823 |
824 | /// If users can be mentioned in a message.
:
841 |
842 | /// An `AllowedMentions` object with everything enabled.
843 | public static let all = AllowedMentions(users: true, roles: true, repliedUser: true, everyone: true)
| |- warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'all' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
844 |
845 | /// An `AllowedMentions` object with only `users` and `repliedUser` enabled.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Message.swift:846:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
820 |
821 | /// Represents what mentions are allowed in a message.
822 | public struct AllowedMentions {
| `- note: consider making struct 'AllowedMentions' conform to the 'Sendable' protocol
823 |
824 | /// If users can be mentioned in a message.
:
844 |
845 | /// An `AllowedMentions` object with only `users` and `repliedUser` enabled.
846 | public static let `default` = AllowedMentions(users: true, roles: false, repliedUser: true, everyone: false)
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
847 |
848 | /// An `AllowedMentions` object with everything disabled.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Message.swift:849:23: warning: static property 'none' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
820 |
821 | /// Represents what mentions are allowed in a message.
822 | public struct AllowedMentions {
| `- note: consider making struct 'AllowedMentions' conform to the 'Sendable' protocol
823 |
824 | /// If users can be mentioned in a message.
:
847 |
848 | /// An `AllowedMentions` object with everything disabled.
849 | public static let none = AllowedMentions(users: false, roles: false, repliedUser: false, everyone: false)
| |- warning: static property 'none' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'none' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
850 |
851 | /// Initializes a new allowed mentions object.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Emoji.swift:91:16: warning: static property 'regex' is not concurrency-safe because non-'Sendable' type 'Regex<Substring>' may have shared mutable state; this is an error in the Swift 6 language mode
89 | private let guildId: Snowflake
90 |
91 | static let regex = #/<a?:.+?:[0-9]{17,20}>/#
| |- warning: static property 'regex' is not concurrency-safe because non-'Sendable' type 'Regex<Substring>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'regex' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
92 |
93 | // Hashable
_StringProcessing.Regex:2:15: note: generic struct 'Regex' does not conform to the 'Sendable' protocol
1 | @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
2 | public struct Regex<Output> : RegexComponent {
| `- note: generic struct 'Regex' does not conform to the 'Sendable' protocol
3 | public var regex: Regex<Output> { get }
4 | @available(iOS 16.0, tvOS 16.0, watchOS 9.0, macOS 13.0, *)
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Message.swift:487:17: warning: capture of 'self' with non-sendable type 'Message' in a `@Sendable` closure; this is an error in the Swift 6 language mode
26 |
27 | /// Represents a Discord message.
28 | public class Message : Object, Hashable, Updateable {
| `- note: class 'Message' does not conform to the 'Sendable' protocol
29 |
30 | /// ID of the message.
:
485 | DispatchQueue.main.async {
486 | self.cacheExpireTimer = .scheduledTimer(withTimeInterval: self.expires.timeIntervalSince(.now), repeats: false, block: { [self] _ in
487 | bot!.removeCachedMessage(id)
| `- warning: capture of 'self' with non-sendable type 'Message' in a `@Sendable` closure; this is an error in the Swift 6 language mode
488 | })
489 | }
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Message.swift:486:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
484 | cacheExpireTimer?.invalidate()
485 | DispatchQueue.main.async {
486 | self.cacheExpireTimer = .scheduledTimer(withTimeInterval: self.expires.timeIntervalSince(.now), repeats: false, block: { [self] _ in
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
487 | bot!.removeCachedMessage(id)
488 | })
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Message.swift:452:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
450 | let after = max(0, after)
451 | if after > 0 {
452 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
453 | await sleep(Int(after * 1000))
454 |
455 | // Since this is in the background, the message could have possibly been already deleted, so silently
456 | // ignore any errors that may arise.
457 | try? await self.bot!.http.deleteMessage(channelId: self.channel.id, messageId: self.id, reason: reason)
| `- note: closure captures 'self' which is accessible to code in the current task
458 | }
459 | } else {
[1797/1805] Compiling Discord Error.swift
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/File.swift:91:25: warning: instance method 'shutdown' is unavailable from asynchronous contexts; This can block the thread and should not be called in an async context; this is an error in the Swift 6 language mode
89 | // Vapor complains if the `Application` isn't
90 | // shutdown before it's deinitialized
91 | defer { app.shutdown() }
| `- warning: instance method 'shutdown' is unavailable from asynchronous contexts; This can block the thread and should not be called in an async context; this is an error in the Swift 6 language mode
92 |
93 | for (n, url) in urlsWithExt.enumerated() {
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/File.swift:85:26: warning: type 'File' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
27 |
28 | /// Represents a file to upload to Discord.
29 | public struct File {
| `- note: consider making struct 'File' conform to the 'Sendable' protocol
30 |
31 | /// The absolute path of the file.
:
83 | let urlsWithExt = urls.filter({ $0.pathExtension != .empty })
84 |
85 | return try await withThrowingTaskGroup(of: File.self, body: { group -> [File] in
| `- warning: type 'File' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
86 | var files = [File]()
87 | let app = Vapor.Application()
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/File.swift:85:69: warning: type 'File' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
27 |
28 | /// Represents a file to upload to Discord.
29 | public struct File {
| `- note: consider making struct 'File' conform to the 'Sendable' protocol
30 |
31 | /// The absolute path of the file.
:
83 | let urlsWithExt = urls.filter({ $0.pathExtension != .empty })
84 |
85 | return try await withThrowingTaskGroup(of: File.self, body: { group -> [File] in
| `- warning: type 'File' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
86 | var files = [File]()
87 | let app = Vapor.Application()
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/File.swift:87:29: warning: initializer 'init' is unavailable from asynchronous contexts; This initialiser cannot be used in async contexts, use Application.make(_:_:) instead; this is an error in the Swift 6 language mode
85 | return try await withThrowingTaskGroup(of: File.self, body: { group -> [File] in
86 | var files = [File]()
87 | let app = Vapor.Application()
| `- warning: initializer 'init' is unavailable from asynchronous contexts; This initialiser cannot be used in async contexts, use Application.make(_:_:) instead; this is an error in the Swift 6 language mode
88 |
89 | // Vapor complains if the `Application` isn't
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/File.swift:94:23: warning: type 'File' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
27 |
28 | /// Represents a file to upload to Discord.
29 | public struct File {
| `- note: consider making struct 'File' conform to the 'Sendable' protocol
30 |
31 | /// The absolute path of the file.
:
92 |
93 | for (n, url) in urlsWithExt.enumerated() {
94 | group.addTask {
| `- warning: type 'File' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
95 | let resp = try await app.client.get(URI(string: url.absoluteString))
96 | let data = Data(buffer: resp.body!)
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Permissions.swift:178:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'Permissions' may have shared mutable state; this is an error in the Swift 6 language mode
141 |
142 | /// Represents the permissions for a channel, user, or guild.
143 | public class Permissions {
| `- note: class 'Permissions' does not conform to the 'Sendable' protocol
144 |
145 | /// The bitset value for the permissions that are enabled/disabled.
:
176 | /// - `sendVoiceMessages`
177 | /// - `requestToSpeak`
178 | public static let `default` = Permissions(enable: [
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'Permissions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
179 | .viewChannel,
180 | .createInstantInvite,
[1798/1805] Compiling Discord File.swift
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/File.swift:91:25: warning: instance method 'shutdown' is unavailable from asynchronous contexts; This can block the thread and should not be called in an async context; this is an error in the Swift 6 language mode
89 | // Vapor complains if the `Application` isn't
90 | // shutdown before it's deinitialized
91 | defer { app.shutdown() }
| `- warning: instance method 'shutdown' is unavailable from asynchronous contexts; This can block the thread and should not be called in an async context; this is an error in the Swift 6 language mode
92 |
93 | for (n, url) in urlsWithExt.enumerated() {
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/File.swift:85:26: warning: type 'File' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
27 |
28 | /// Represents a file to upload to Discord.
29 | public struct File {
| `- note: consider making struct 'File' conform to the 'Sendable' protocol
30 |
31 | /// The absolute path of the file.
:
83 | let urlsWithExt = urls.filter({ $0.pathExtension != .empty })
84 |
85 | return try await withThrowingTaskGroup(of: File.self, body: { group -> [File] in
| `- warning: type 'File' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
86 | var files = [File]()
87 | let app = Vapor.Application()
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/File.swift:85:69: warning: type 'File' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
27 |
28 | /// Represents a file to upload to Discord.
29 | public struct File {
| `- note: consider making struct 'File' conform to the 'Sendable' protocol
30 |
31 | /// The absolute path of the file.
:
83 | let urlsWithExt = urls.filter({ $0.pathExtension != .empty })
84 |
85 | return try await withThrowingTaskGroup(of: File.self, body: { group -> [File] in
| `- warning: type 'File' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
86 | var files = [File]()
87 | let app = Vapor.Application()
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/File.swift:87:29: warning: initializer 'init' is unavailable from asynchronous contexts; This initialiser cannot be used in async contexts, use Application.make(_:_:) instead; this is an error in the Swift 6 language mode
85 | return try await withThrowingTaskGroup(of: File.self, body: { group -> [File] in
86 | var files = [File]()
87 | let app = Vapor.Application()
| `- warning: initializer 'init' is unavailable from asynchronous contexts; This initialiser cannot be used in async contexts, use Application.make(_:_:) instead; this is an error in the Swift 6 language mode
88 |
89 | // Vapor complains if the `Application` isn't
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/File.swift:94:23: warning: type 'File' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
27 |
28 | /// Represents a file to upload to Discord.
29 | public struct File {
| `- note: consider making struct 'File' conform to the 'Sendable' protocol
30 |
31 | /// The absolute path of the file.
:
92 |
93 | for (n, url) in urlsWithExt.enumerated() {
94 | group.addTask {
| `- warning: type 'File' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
95 | let resp = try await app.client.get(URI(string: url.absoluteString))
96 | let data = Data(buffer: resp.body!)
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Permissions.swift:178:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'Permissions' may have shared mutable state; this is an error in the Swift 6 language mode
141 |
142 | /// Represents the permissions for a channel, user, or guild.
143 | public class Permissions {
| `- note: class 'Permissions' does not conform to the 'Sendable' protocol
144 |
145 | /// The bitset value for the permissions that are enabled/disabled.
:
176 | /// - `sendVoiceMessages`
177 | /// - `requestToSpeak`
178 | public static let `default` = Permissions(enable: [
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'Permissions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
179 | .viewChannel,
180 | .createInstantInvite,
[1799/1805] Compiling Discord Guild.swift
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/File.swift:91:25: warning: instance method 'shutdown' is unavailable from asynchronous contexts; This can block the thread and should not be called in an async context; this is an error in the Swift 6 language mode
89 | // Vapor complains if the `Application` isn't
90 | // shutdown before it's deinitialized
91 | defer { app.shutdown() }
| `- warning: instance method 'shutdown' is unavailable from asynchronous contexts; This can block the thread and should not be called in an async context; this is an error in the Swift 6 language mode
92 |
93 | for (n, url) in urlsWithExt.enumerated() {
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/File.swift:85:26: warning: type 'File' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
27 |
28 | /// Represents a file to upload to Discord.
29 | public struct File {
| `- note: consider making struct 'File' conform to the 'Sendable' protocol
30 |
31 | /// The absolute path of the file.
:
83 | let urlsWithExt = urls.filter({ $0.pathExtension != .empty })
84 |
85 | return try await withThrowingTaskGroup(of: File.self, body: { group -> [File] in
| `- warning: type 'File' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
86 | var files = [File]()
87 | let app = Vapor.Application()
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/File.swift:85:69: warning: type 'File' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
27 |
28 | /// Represents a file to upload to Discord.
29 | public struct File {
| `- note: consider making struct 'File' conform to the 'Sendable' protocol
30 |
31 | /// The absolute path of the file.
:
83 | let urlsWithExt = urls.filter({ $0.pathExtension != .empty })
84 |
85 | return try await withThrowingTaskGroup(of: File.self, body: { group -> [File] in
| `- warning: type 'File' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
86 | var files = [File]()
87 | let app = Vapor.Application()
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/File.swift:87:29: warning: initializer 'init' is unavailable from asynchronous contexts; This initialiser cannot be used in async contexts, use Application.make(_:_:) instead; this is an error in the Swift 6 language mode
85 | return try await withThrowingTaskGroup(of: File.self, body: { group -> [File] in
86 | var files = [File]()
87 | let app = Vapor.Application()
| `- warning: initializer 'init' is unavailable from asynchronous contexts; This initialiser cannot be used in async contexts, use Application.make(_:_:) instead; this is an error in the Swift 6 language mode
88 |
89 | // Vapor complains if the `Application` isn't
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/File.swift:94:23: warning: type 'File' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
27 |
28 | /// Represents a file to upload to Discord.
29 | public struct File {
| `- note: consider making struct 'File' conform to the 'Sendable' protocol
30 |
31 | /// The absolute path of the file.
:
92 |
93 | for (n, url) in urlsWithExt.enumerated() {
94 | group.addTask {
| `- warning: type 'File' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
95 | let resp = try await app.client.get(URI(string: url.absoluteString))
96 | let data = Data(buffer: resp.body!)
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Permissions.swift:178:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'Permissions' may have shared mutable state; this is an error in the Swift 6 language mode
141 |
142 | /// Represents the permissions for a channel, user, or guild.
143 | public class Permissions {
| `- note: class 'Permissions' does not conform to the 'Sendable' protocol
144 |
145 | /// The bitset value for the permissions that are enabled/disabled.
:
176 | /// - `sendVoiceMessages`
177 | /// - `requestToSpeak`
178 | public static let `default` = Permissions(enable: [
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'Permissions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
179 | .viewChannel,
180 | .createInstantInvite,
[1800/1805] Compiling Discord Components.swift
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Components.swift:159:27: warning: capture of 'self' with non-sendable type 'UI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
48 |
49 | /// Represents the UI components on a message such as a ``Button`` or ``SelectMenu``.
50 | public class UI {
| `- note: class 'UI' does not conform to the 'Sendable' protocol
51 |
52 | /// The components that make up the UI.
:
157 | self.timer = .scheduledTimer(withTimeInterval: self.timeout, repeats: false, block: { _ in
158 | Task {
159 | await self.onTimeout(self.attachedMessage)
| `- warning: capture of 'self' with non-sendable type 'UI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
160 | }
161 | })
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Components.swift:159:27: warning: capture of 'self' with non-sendable type 'UI' in an isolated closure; this is an error in the Swift 6 language mode
48 |
49 | /// Represents the UI components on a message such as a ``Button`` or ``SelectMenu``.
50 | public class UI {
| `- note: class 'UI' does not conform to the 'Sendable' protocol
51 |
52 | /// The components that make up the UI.
:
157 | self.timer = .scheduledTimer(withTimeInterval: self.timeout, repeats: false, block: { _ in
158 | Task {
159 | await self.onTimeout(self.attachedMessage)
| `- warning: capture of 'self' with non-sendable type 'UI' in an isolated closure; this is an error in the Swift 6 language mode
160 | }
161 | })
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Emoji.swift:91:16: warning: static property 'regex' is not concurrency-safe because non-'Sendable' type 'Regex<Substring>' may have shared mutable state; this is an error in the Swift 6 language mode
89 | private let guildId: Snowflake
90 |
91 | static let regex = #/<a?:.+?:[0-9]{17,20}>/#
| |- warning: static property 'regex' is not concurrency-safe because non-'Sendable' type 'Regex<Substring>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'regex' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
92 |
93 | // Hashable
_StringProcessing.Regex:2:15: note: generic struct 'Regex' does not conform to the 'Sendable' protocol
1 | @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
2 | public struct Regex<Output> : RegexComponent {
| `- note: generic struct 'Regex' does not conform to the 'Sendable' protocol
3 | public var regex: Regex<Output> { get }
4 | @available(iOS 16.0, tvOS 16.0, watchOS 9.0, macOS 13.0, *)
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Components.swift:157:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
155 | timer?.invalidate()
156 | DispatchQueue.main.async {
157 | self.timer = .scheduledTimer(withTimeInterval: self.timeout, repeats: false, block: { _ in
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
158 | Task {
159 | await self.onTimeout(self.attachedMessage)
[1801/1805] Compiling Discord Embed.swift
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Components.swift:159:27: warning: capture of 'self' with non-sendable type 'UI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
48 |
49 | /// Represents the UI components on a message such as a ``Button`` or ``SelectMenu``.
50 | public class UI {
| `- note: class 'UI' does not conform to the 'Sendable' protocol
51 |
52 | /// The components that make up the UI.
:
157 | self.timer = .scheduledTimer(withTimeInterval: self.timeout, repeats: false, block: { _ in
158 | Task {
159 | await self.onTimeout(self.attachedMessage)
| `- warning: capture of 'self' with non-sendable type 'UI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
160 | }
161 | })
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Components.swift:159:27: warning: capture of 'self' with non-sendable type 'UI' in an isolated closure; this is an error in the Swift 6 language mode
48 |
49 | /// Represents the UI components on a message such as a ``Button`` or ``SelectMenu``.
50 | public class UI {
| `- note: class 'UI' does not conform to the 'Sendable' protocol
51 |
52 | /// The components that make up the UI.
:
157 | self.timer = .scheduledTimer(withTimeInterval: self.timeout, repeats: false, block: { _ in
158 | Task {
159 | await self.onTimeout(self.attachedMessage)
| `- warning: capture of 'self' with non-sendable type 'UI' in an isolated closure; this is an error in the Swift 6 language mode
160 | }
161 | })
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Emoji.swift:91:16: warning: static property 'regex' is not concurrency-safe because non-'Sendable' type 'Regex<Substring>' may have shared mutable state; this is an error in the Swift 6 language mode
89 | private let guildId: Snowflake
90 |
91 | static let regex = #/<a?:.+?:[0-9]{17,20}>/#
| |- warning: static property 'regex' is not concurrency-safe because non-'Sendable' type 'Regex<Substring>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'regex' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
92 |
93 | // Hashable
_StringProcessing.Regex:2:15: note: generic struct 'Regex' does not conform to the 'Sendable' protocol
1 | @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
2 | public struct Regex<Output> : RegexComponent {
| `- note: generic struct 'Regex' does not conform to the 'Sendable' protocol
3 | public var regex: Regex<Output> { get }
4 | @available(iOS 16.0, tvOS 16.0, watchOS 9.0, macOS 13.0, *)
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Components.swift:157:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
155 | timer?.invalidate()
156 | DispatchQueue.main.async {
157 | self.timer = .scheduledTimer(withTimeInterval: self.timeout, repeats: false, block: { _ in
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
158 | Task {
159 | await self.onTimeout(self.attachedMessage)
[1802/1805] Compiling Discord Emoji.swift
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Components.swift:159:27: warning: capture of 'self' with non-sendable type 'UI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
48 |
49 | /// Represents the UI components on a message such as a ``Button`` or ``SelectMenu``.
50 | public class UI {
| `- note: class 'UI' does not conform to the 'Sendable' protocol
51 |
52 | /// The components that make up the UI.
:
157 | self.timer = .scheduledTimer(withTimeInterval: self.timeout, repeats: false, block: { _ in
158 | Task {
159 | await self.onTimeout(self.attachedMessage)
| `- warning: capture of 'self' with non-sendable type 'UI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
160 | }
161 | })
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Components.swift:159:27: warning: capture of 'self' with non-sendable type 'UI' in an isolated closure; this is an error in the Swift 6 language mode
48 |
49 | /// Represents the UI components on a message such as a ``Button`` or ``SelectMenu``.
50 | public class UI {
| `- note: class 'UI' does not conform to the 'Sendable' protocol
51 |
52 | /// The components that make up the UI.
:
157 | self.timer = .scheduledTimer(withTimeInterval: self.timeout, repeats: false, block: { _ in
158 | Task {
159 | await self.onTimeout(self.attachedMessage)
| `- warning: capture of 'self' with non-sendable type 'UI' in an isolated closure; this is an error in the Swift 6 language mode
160 | }
161 | })
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Emoji.swift:91:16: warning: static property 'regex' is not concurrency-safe because non-'Sendable' type 'Regex<Substring>' may have shared mutable state; this is an error in the Swift 6 language mode
89 | private let guildId: Snowflake
90 |
91 | static let regex = #/<a?:.+?:[0-9]{17,20}>/#
| |- warning: static property 'regex' is not concurrency-safe because non-'Sendable' type 'Regex<Substring>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'regex' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
92 |
93 | // Hashable
_StringProcessing.Regex:2:15: note: generic struct 'Regex' does not conform to the 'Sendable' protocol
1 | @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
2 | public struct Regex<Output> : RegexComponent {
| `- note: generic struct 'Regex' does not conform to the 'Sendable' protocol
3 | public var regex: Regex<Output> { get }
4 | @available(iOS 16.0, tvOS 16.0, watchOS 9.0, macOS 13.0, *)
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Components.swift:157:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
155 | timer?.invalidate()
156 | DispatchQueue.main.async {
157 | self.timer = .scheduledTimer(withTimeInterval: self.timeout, repeats: false, block: { _ in
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
158 | Task {
159 | await self.onTimeout(self.attachedMessage)
[1803/1805] Compiling Discord Discord.swift
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:59:23: warning: static property 'allowedMentions' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
57 |
58 | /// The global allowed mentions.
59 | public static var allowedMentions = AllowedMentions.default
| |- warning: static property 'allowedMentions' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'allowedMentions' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'allowedMentions' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
60 |
61 | /// Controls what will/won't be cached.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Message.swift:846:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
820 |
821 | /// Represents what mentions are allowed in a message.
822 | public struct AllowedMentions {
| `- note: consider making struct 'AllowedMentions' conform to the 'Sendable' protocol
823 |
824 | /// If users can be mentioned in a message.
:
844 |
845 | /// An `AllowedMentions` object with only `users` and `repliedUser` enabled.
846 | public static let `default` = AllowedMentions(users: true, roles: false, repliedUser: true, everyone: false)
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
847 |
848 | /// An `AllowedMentions` object with everything disabled.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:663:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
655 |
656 | /// Represents what the bot is permitted to cache.
657 | public struct CacheManager {
| `- note: consider making struct 'CacheManager' conform to the 'Sendable' protocol
658 |
659 | /// Has all caching capabilities enabled and a max message cache size of 10,000.
:
661 |
662 | /// Has all caching capabilities enabled and a max message cache size of 1,500.
663 | public static let `default` = CacheManager(messages: 1500, users: true, members: true)
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
664 |
665 | /// Has `users` caching capabilities disabled and a max message cache size of 500.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:660:23: warning: static property 'scaled' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
655 |
656 | /// Represents what the bot is permitted to cache.
657 | public struct CacheManager {
| `- note: consider making struct 'CacheManager' conform to the 'Sendable' protocol
658 |
659 | /// Has all caching capabilities enabled and a max message cache size of 10,000.
660 | public static let scaled = CacheManager(messages: 10_000, users: true, members: true)
| |- warning: static property 'scaled' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'scaled' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
661 |
662 | /// Has all caching capabilities enabled and a max message cache size of 1,500.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:666:23: warning: static property 'limited' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
655 |
656 | /// Represents what the bot is permitted to cache.
657 | public struct CacheManager {
| `- note: consider making struct 'CacheManager' conform to the 'Sendable' protocol
658 |
659 | /// Has all caching capabilities enabled and a max message cache size of 10,000.
:
664 |
665 | /// Has `users` caching capabilities disabled and a max message cache size of 500.
666 | public static let limited = CacheManager(messages: 500, users: false, members: true)
| |- warning: static property 'limited' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'limited' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
667 |
668 | /// Has all caching capabilities disabled and a max message cache size of 100.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:669:23: warning: static property 'restricted' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
655 |
656 | /// Represents what the bot is permitted to cache.
657 | public struct CacheManager {
| `- note: consider making struct 'CacheManager' conform to the 'Sendable' protocol
658 |
659 | /// Has all caching capabilities enabled and a max message cache size of 10,000.
:
667 |
668 | /// Has all caching capabilities disabled and a max message cache size of 100.
669 | public static let restricted = CacheManager(messages: 100, users: false, members: false)
| |- warning: static property 'restricted' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'restricted' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
670 |
671 | /// Has all caching capabilities disabled and a max message cache size of 0.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:672:23: warning: static property 'none' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
655 |
656 | /// Represents what the bot is permitted to cache.
657 | public struct CacheManager {
| `- note: consider making struct 'CacheManager' conform to the 'Sendable' protocol
658 |
659 | /// Has all caching capabilities enabled and a max message cache size of 10,000.
:
670 |
671 | /// Has all caching capabilities disabled and a max message cache size of 0.
672 | public static let none = CacheManager(messages: 0, users: false, members: false)
| |- warning: static property 'none' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'none' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
673 |
674 | /// The amount of messages that are allowed to be cached.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:349:28: warning: capture of 'self' with non-sendable type 'Bot' in a `@Sendable` closure; this is an error in the Swift 6 language mode
27 |
28 | /// Represents a Discord bot.
29 | public class Bot {
| `- note: class 'Bot' does not conform to the 'Sendable' protocol
30 |
31 | /// Version of the library.
:
347 | if !isConnected {
348 | try! app.eventLoopGroup.any().makeFutureWithTask {
349 | try! await self.gw.startNewSession()
| `- warning: capture of 'self' with non-sendable type 'Bot' in a `@Sendable` closure; this is an error in the Swift 6 language mode
350 | }.wait()
351 | if let onceExecute {
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:202:17: warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
200 | on: elg,
201 | onUpgrade: { socket in
202 | self.websocketSetup(websocket: socket)
| `- warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
203 | Log.message("[Reconnect] connection successful - sending RESUME payload...")
204 | self.sendFrame(resumePayload)
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:204:32: warning: capture of 'resumePayload' with non-sendable type 'JSON' (aka 'Dictionary<String, Any>') in a `@Sendable` closure; this is an error in the Swift 6 language mode
202 | self.websocketSetup(websocket: socket)
203 | Log.message("[Reconnect] connection successful - sending RESUME payload...")
204 | self.sendFrame(resumePayload)
| `- warning: capture of 'resumePayload' with non-sendable type 'JSON' (aka 'Dictionary<String, Any>') in a `@Sendable` closure; this is an error in the Swift 6 language mode
205 | }
206 | ).get()
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:213:45: warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
211 | ws = websocket
212 | receive()
213 | ws.onClose.whenComplete { _ in try! self.websocketClosed() }
| `- warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
214 | }
215 |
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:241:16: warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
239 | // so a 1.1 second delay should be more than enough.
240 | elg.any().scheduleTask(in: .milliseconds(1100)) {
241 | if self.clientHeartbeatAcks > 0 {
| `- warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
242 | self.clientHeartbeatAcks = -1
243 | Log.message("heartbeat ACK (client)")
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:247:31: warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
245 | self.clientHeartbeatAcks = 0
246 | Task {
247 | try await self.danglingReconnect(log: "client did not receive HEARTBEAT ACK after a heartbeat was sent - attempting dangling reconnecting...")
| `- warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
248 | }
249 | }
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:289:17: warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
287 | on: elg,
288 | onUpgrade: { socket in
289 | self.websocketSetup(websocket: socket)
| `- warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
290 | Log.message("gateway connection established - receiver & onClose set")
291 | }
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:366:21: warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
364 | private func receive() {
365 | ws.onText { [unowned self] (_, message) in
366 | defer { receive() }
| `- warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
367 |
368 | let resumePayload = HTTPClient.strJsonToDict(message)
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:366:21: warning: capture of 'self' with non-sendable type 'Gateway' in an isolated local function; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
364 | private func receive() {
365 | ws.onText { [unowned self] (_, message) in
366 | defer { receive() }
| `- warning: capture of 'self' with non-sendable type 'Gateway' in an isolated local function; this is an error in the Swift 6 language mode
367 |
368 | let resumePayload = HTTPClient.strJsonToDict(message)
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:386:31: warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
384 | else { wsResume?.sequence = gatewayPayload.s! }
385 | Task {
386 | await dispatchAndUpdate(event: event, data: gatewayPayload.d!)
| `- warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
387 | }
388 | }
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:393:21: warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
391 | let reset = { (log: String) -> Void in
392 | Log.message(log)
393 | self.resetGatewayValues(withCancel: false)
| `- warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
394 | }
395 | // Discord states there's no need to re-identify after a RECONNECT
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:432:27: warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
430 |
431 | heartbeatTask = Task(priority: .background, operation: {
432 | await indefHeartbeat()
| `- warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
433 | })
434 |
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:437:34: warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
435 | case Opcode.invalidSession:
436 | Log.message("gateway SESSION INVALIDATED - starting new session...")
437 | Task { try await startNewSession() }
| `- warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
438 |
439 | case Opcode.reconnect:
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:442:30: warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
440 | Log.message("gateway requested RECONNECT - reconnecting...")
441 | receivedReconnectRequest = true
442 | Task { await reconnect() }
| `- warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
443 |
444 | case Opcode.heartbeat:
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:352:22: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
350 | }.wait()
351 | if let onceExecute {
352 | Task { await onceExecute() }
| | `- note: closure captures 'onceExecute' which is accessible to code in the current task
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
353 | self.onceExecute = nil
354 | }
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:300:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
298 | func new(log: String) {
299 | Log.message(log + " - starting new session...")
300 | Task { try await startNewSession() }
| | `- note: closure captures 'self' which is accessible to code in the current task
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
301 | }
302 |
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:354:22: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
352 | if bot.isConnected && !receivedReconnectRequest {
353 | nilClose = true
354 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
355 | try await self.danglingReconnect(log: "gateway disconnected with nil close code - bot connected/no reconnect request - attempting dangling reconnect...")
| `- note: closure captures 'self' which is accessible to code in the current task
356 | }
357 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:385:21: warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> @out τ_0_0 for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
364 | private func receive() {
365 | ws.onText { [unowned self] (_, message) in
366 | defer { receive() }
| `- note: access can happen concurrently
367 |
368 | let resumePayload = HTTPClient.strJsonToDict(message)
:
383 | }
384 | else { wsResume?.sequence = gatewayPayload.s! }
385 | Task {
| `- warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> @out τ_0_0 for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
386 | await dispatchAndUpdate(event: event, data: gatewayPayload.d!)
387 | }
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:431:33: warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> @out τ_0_0 for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
429 | heartbeatTask?.cancel()
430 |
431 | heartbeatTask = Task(priority: .background, operation: {
| | `- warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> @out τ_0_0 for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
| `- note: access can happen concurrently
432 | await indefHeartbeat()
433 | })
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:437:17: warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> (@out τ_0_0, @error any Error) for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
364 | private func receive() {
365 | ws.onText { [unowned self] (_, message) in
366 | defer { receive() }
| `- note: access can happen concurrently
367 |
368 | let resumePayload = HTTPClient.strJsonToDict(message)
:
435 | case Opcode.invalidSession:
436 | Log.message("gateway SESSION INVALIDATED - starting new session...")
437 | Task { try await startNewSession() }
| `- warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> (@out τ_0_0, @error any Error) for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
438 |
439 | case Opcode.reconnect:
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:442:17: warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> @out τ_0_0 for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
364 | private func receive() {
365 | ws.onText { [unowned self] (_, message) in
366 | defer { receive() }
| `- note: access can happen concurrently
367 |
368 | let resumePayload = HTTPClient.strJsonToDict(message)
:
440 | Log.message("gateway requested RECONNECT - reconnecting...")
441 | receivedReconnectRequest = true
442 | Task { await reconnect() }
| `- warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> @out τ_0_0 for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
443 |
444 | case Opcode.heartbeat:
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:920:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
918 | let interaction = Interaction(bot: bot, interactionData: data)
919 | dispatch({ await $0.onInteractionCreate(interaction: interaction) })
920 | Task { await handleInteractions(interaction: interaction) }
| | `- note: closure captures 'self' which is accessible to code in the current task
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
921 |
922 | case .inviteCreate:
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:1422:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1420 | for element in self {
1421 | guard element.isEnabled else { continue }
1422 | Task { await operation(element) }
| | | `- note: closure captures non-Sendable 'element'
| | `- note: closure captures non-Sendable 'operation'
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1423 | }
1424 | }
[1804/1805] Compiling Discord Gateway.swift
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:59:23: warning: static property 'allowedMentions' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
57 |
58 | /// The global allowed mentions.
59 | public static var allowedMentions = AllowedMentions.default
| |- warning: static property 'allowedMentions' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'allowedMentions' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'allowedMentions' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
60 |
61 | /// Controls what will/won't be cached.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Message.swift:846:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
820 |
821 | /// Represents what mentions are allowed in a message.
822 | public struct AllowedMentions {
| `- note: consider making struct 'AllowedMentions' conform to the 'Sendable' protocol
823 |
824 | /// If users can be mentioned in a message.
:
844 |
845 | /// An `AllowedMentions` object with only `users` and `repliedUser` enabled.
846 | public static let `default` = AllowedMentions(users: true, roles: false, repliedUser: true, everyone: false)
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
847 |
848 | /// An `AllowedMentions` object with everything disabled.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:663:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
655 |
656 | /// Represents what the bot is permitted to cache.
657 | public struct CacheManager {
| `- note: consider making struct 'CacheManager' conform to the 'Sendable' protocol
658 |
659 | /// Has all caching capabilities enabled and a max message cache size of 10,000.
:
661 |
662 | /// Has all caching capabilities enabled and a max message cache size of 1,500.
663 | public static let `default` = CacheManager(messages: 1500, users: true, members: true)
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
664 |
665 | /// Has `users` caching capabilities disabled and a max message cache size of 500.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:660:23: warning: static property 'scaled' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
655 |
656 | /// Represents what the bot is permitted to cache.
657 | public struct CacheManager {
| `- note: consider making struct 'CacheManager' conform to the 'Sendable' protocol
658 |
659 | /// Has all caching capabilities enabled and a max message cache size of 10,000.
660 | public static let scaled = CacheManager(messages: 10_000, users: true, members: true)
| |- warning: static property 'scaled' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'scaled' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
661 |
662 | /// Has all caching capabilities enabled and a max message cache size of 1,500.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:666:23: warning: static property 'limited' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
655 |
656 | /// Represents what the bot is permitted to cache.
657 | public struct CacheManager {
| `- note: consider making struct 'CacheManager' conform to the 'Sendable' protocol
658 |
659 | /// Has all caching capabilities enabled and a max message cache size of 10,000.
:
664 |
665 | /// Has `users` caching capabilities disabled and a max message cache size of 500.
666 | public static let limited = CacheManager(messages: 500, users: false, members: true)
| |- warning: static property 'limited' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'limited' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
667 |
668 | /// Has all caching capabilities disabled and a max message cache size of 100.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:669:23: warning: static property 'restricted' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
655 |
656 | /// Represents what the bot is permitted to cache.
657 | public struct CacheManager {
| `- note: consider making struct 'CacheManager' conform to the 'Sendable' protocol
658 |
659 | /// Has all caching capabilities enabled and a max message cache size of 10,000.
:
667 |
668 | /// Has all caching capabilities disabled and a max message cache size of 100.
669 | public static let restricted = CacheManager(messages: 100, users: false, members: false)
| |- warning: static property 'restricted' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'restricted' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
670 |
671 | /// Has all caching capabilities disabled and a max message cache size of 0.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:672:23: warning: static property 'none' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
655 |
656 | /// Represents what the bot is permitted to cache.
657 | public struct CacheManager {
| `- note: consider making struct 'CacheManager' conform to the 'Sendable' protocol
658 |
659 | /// Has all caching capabilities enabled and a max message cache size of 10,000.
:
670 |
671 | /// Has all caching capabilities disabled and a max message cache size of 0.
672 | public static let none = CacheManager(messages: 0, users: false, members: false)
| |- warning: static property 'none' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'none' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
673 |
674 | /// The amount of messages that are allowed to be cached.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:349:28: warning: capture of 'self' with non-sendable type 'Bot' in a `@Sendable` closure; this is an error in the Swift 6 language mode
27 |
28 | /// Represents a Discord bot.
29 | public class Bot {
| `- note: class 'Bot' does not conform to the 'Sendable' protocol
30 |
31 | /// Version of the library.
:
347 | if !isConnected {
348 | try! app.eventLoopGroup.any().makeFutureWithTask {
349 | try! await self.gw.startNewSession()
| `- warning: capture of 'self' with non-sendable type 'Bot' in a `@Sendable` closure; this is an error in the Swift 6 language mode
350 | }.wait()
351 | if let onceExecute {
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:202:17: warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
200 | on: elg,
201 | onUpgrade: { socket in
202 | self.websocketSetup(websocket: socket)
| `- warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
203 | Log.message("[Reconnect] connection successful - sending RESUME payload...")
204 | self.sendFrame(resumePayload)
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:204:32: warning: capture of 'resumePayload' with non-sendable type 'JSON' (aka 'Dictionary<String, Any>') in a `@Sendable` closure; this is an error in the Swift 6 language mode
202 | self.websocketSetup(websocket: socket)
203 | Log.message("[Reconnect] connection successful - sending RESUME payload...")
204 | self.sendFrame(resumePayload)
| `- warning: capture of 'resumePayload' with non-sendable type 'JSON' (aka 'Dictionary<String, Any>') in a `@Sendable` closure; this is an error in the Swift 6 language mode
205 | }
206 | ).get()
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:213:45: warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
211 | ws = websocket
212 | receive()
213 | ws.onClose.whenComplete { _ in try! self.websocketClosed() }
| `- warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
214 | }
215 |
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:241:16: warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
239 | // so a 1.1 second delay should be more than enough.
240 | elg.any().scheduleTask(in: .milliseconds(1100)) {
241 | if self.clientHeartbeatAcks > 0 {
| `- warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
242 | self.clientHeartbeatAcks = -1
243 | Log.message("heartbeat ACK (client)")
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:247:31: warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
245 | self.clientHeartbeatAcks = 0
246 | Task {
247 | try await self.danglingReconnect(log: "client did not receive HEARTBEAT ACK after a heartbeat was sent - attempting dangling reconnecting...")
| `- warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
248 | }
249 | }
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:289:17: warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
287 | on: elg,
288 | onUpgrade: { socket in
289 | self.websocketSetup(websocket: socket)
| `- warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
290 | Log.message("gateway connection established - receiver & onClose set")
291 | }
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:366:21: warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
364 | private func receive() {
365 | ws.onText { [unowned self] (_, message) in
366 | defer { receive() }
| `- warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
367 |
368 | let resumePayload = HTTPClient.strJsonToDict(message)
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:366:21: warning: capture of 'self' with non-sendable type 'Gateway' in an isolated local function; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
364 | private func receive() {
365 | ws.onText { [unowned self] (_, message) in
366 | defer { receive() }
| `- warning: capture of 'self' with non-sendable type 'Gateway' in an isolated local function; this is an error in the Swift 6 language mode
367 |
368 | let resumePayload = HTTPClient.strJsonToDict(message)
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:386:31: warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
384 | else { wsResume?.sequence = gatewayPayload.s! }
385 | Task {
386 | await dispatchAndUpdate(event: event, data: gatewayPayload.d!)
| `- warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
387 | }
388 | }
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:393:21: warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
391 | let reset = { (log: String) -> Void in
392 | Log.message(log)
393 | self.resetGatewayValues(withCancel: false)
| `- warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
394 | }
395 | // Discord states there's no need to re-identify after a RECONNECT
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:432:27: warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
430 |
431 | heartbeatTask = Task(priority: .background, operation: {
432 | await indefHeartbeat()
| `- warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
433 | })
434 |
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:437:34: warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
435 | case Opcode.invalidSession:
436 | Log.message("gateway SESSION INVALIDATED - starting new session...")
437 | Task { try await startNewSession() }
| `- warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
438 |
439 | case Opcode.reconnect:
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:442:30: warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
440 | Log.message("gateway requested RECONNECT - reconnecting...")
441 | receivedReconnectRequest = true
442 | Task { await reconnect() }
| `- warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
443 |
444 | case Opcode.heartbeat:
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:352:22: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
350 | }.wait()
351 | if let onceExecute {
352 | Task { await onceExecute() }
| | `- note: closure captures 'onceExecute' which is accessible to code in the current task
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
353 | self.onceExecute = nil
354 | }
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:300:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
298 | func new(log: String) {
299 | Log.message(log + " - starting new session...")
300 | Task { try await startNewSession() }
| | `- note: closure captures 'self' which is accessible to code in the current task
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
301 | }
302 |
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:354:22: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
352 | if bot.isConnected && !receivedReconnectRequest {
353 | nilClose = true
354 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
355 | try await self.danglingReconnect(log: "gateway disconnected with nil close code - bot connected/no reconnect request - attempting dangling reconnect...")
| `- note: closure captures 'self' which is accessible to code in the current task
356 | }
357 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:385:21: warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> @out τ_0_0 for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
364 | private func receive() {
365 | ws.onText { [unowned self] (_, message) in
366 | defer { receive() }
| `- note: access can happen concurrently
367 |
368 | let resumePayload = HTTPClient.strJsonToDict(message)
:
383 | }
384 | else { wsResume?.sequence = gatewayPayload.s! }
385 | Task {
| `- warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> @out τ_0_0 for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
386 | await dispatchAndUpdate(event: event, data: gatewayPayload.d!)
387 | }
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:431:33: warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> @out τ_0_0 for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
429 | heartbeatTask?.cancel()
430 |
431 | heartbeatTask = Task(priority: .background, operation: {
| | `- warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> @out τ_0_0 for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
| `- note: access can happen concurrently
432 | await indefHeartbeat()
433 | })
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:437:17: warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> (@out τ_0_0, @error any Error) for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
364 | private func receive() {
365 | ws.onText { [unowned self] (_, message) in
366 | defer { receive() }
| `- note: access can happen concurrently
367 |
368 | let resumePayload = HTTPClient.strJsonToDict(message)
:
435 | case Opcode.invalidSession:
436 | Log.message("gateway SESSION INVALIDATED - starting new session...")
437 | Task { try await startNewSession() }
| `- warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> (@out τ_0_0, @error any Error) for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
438 |
439 | case Opcode.reconnect:
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:442:17: warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> @out τ_0_0 for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
364 | private func receive() {
365 | ws.onText { [unowned self] (_, message) in
366 | defer { receive() }
| `- note: access can happen concurrently
367 |
368 | let resumePayload = HTTPClient.strJsonToDict(message)
:
440 | Log.message("gateway requested RECONNECT - reconnecting...")
441 | receivedReconnectRequest = true
442 | Task { await reconnect() }
| `- warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> @out τ_0_0 for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
443 |
444 | case Opcode.heartbeat:
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:920:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
918 | let interaction = Interaction(bot: bot, interactionData: data)
919 | dispatch({ await $0.onInteractionCreate(interaction: interaction) })
920 | Task { await handleInteractions(interaction: interaction) }
| | `- note: closure captures 'self' which is accessible to code in the current task
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
921 |
922 | case .inviteCreate:
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:1422:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1420 | for element in self {
1421 | guard element.isEnabled else { continue }
1422 | Task { await operation(element) }
| | | `- note: closure captures non-Sendable 'element'
| | `- note: closure captures non-Sendable 'operation'
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1423 | }
1424 | }
[1805/1805] Compiling Discord Http.swift
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:59:23: warning: static property 'allowedMentions' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
57 |
58 | /// The global allowed mentions.
59 | public static var allowedMentions = AllowedMentions.default
| |- warning: static property 'allowedMentions' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'allowedMentions' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'allowedMentions' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
60 |
61 | /// Controls what will/won't be cached.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Models/Message.swift:846:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
820 |
821 | /// Represents what mentions are allowed in a message.
822 | public struct AllowedMentions {
| `- note: consider making struct 'AllowedMentions' conform to the 'Sendable' protocol
823 |
824 | /// If users can be mentioned in a message.
:
844 |
845 | /// An `AllowedMentions` object with only `users` and `repliedUser` enabled.
846 | public static let `default` = AllowedMentions(users: true, roles: false, repliedUser: true, everyone: false)
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'AllowedMentions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
847 |
848 | /// An `AllowedMentions` object with everything disabled.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:663:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
655 |
656 | /// Represents what the bot is permitted to cache.
657 | public struct CacheManager {
| `- note: consider making struct 'CacheManager' conform to the 'Sendable' protocol
658 |
659 | /// Has all caching capabilities enabled and a max message cache size of 10,000.
:
661 |
662 | /// Has all caching capabilities enabled and a max message cache size of 1,500.
663 | public static let `default` = CacheManager(messages: 1500, users: true, members: true)
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
664 |
665 | /// Has `users` caching capabilities disabled and a max message cache size of 500.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:660:23: warning: static property 'scaled' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
655 |
656 | /// Represents what the bot is permitted to cache.
657 | public struct CacheManager {
| `- note: consider making struct 'CacheManager' conform to the 'Sendable' protocol
658 |
659 | /// Has all caching capabilities enabled and a max message cache size of 10,000.
660 | public static let scaled = CacheManager(messages: 10_000, users: true, members: true)
| |- warning: static property 'scaled' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'scaled' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
661 |
662 | /// Has all caching capabilities enabled and a max message cache size of 1,500.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:666:23: warning: static property 'limited' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
655 |
656 | /// Represents what the bot is permitted to cache.
657 | public struct CacheManager {
| `- note: consider making struct 'CacheManager' conform to the 'Sendable' protocol
658 |
659 | /// Has all caching capabilities enabled and a max message cache size of 10,000.
:
664 |
665 | /// Has `users` caching capabilities disabled and a max message cache size of 500.
666 | public static let limited = CacheManager(messages: 500, users: false, members: true)
| |- warning: static property 'limited' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'limited' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
667 |
668 | /// Has all caching capabilities disabled and a max message cache size of 100.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:669:23: warning: static property 'restricted' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
655 |
656 | /// Represents what the bot is permitted to cache.
657 | public struct CacheManager {
| `- note: consider making struct 'CacheManager' conform to the 'Sendable' protocol
658 |
659 | /// Has all caching capabilities enabled and a max message cache size of 10,000.
:
667 |
668 | /// Has all caching capabilities disabled and a max message cache size of 100.
669 | public static let restricted = CacheManager(messages: 100, users: false, members: false)
| |- warning: static property 'restricted' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'restricted' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
670 |
671 | /// Has all caching capabilities disabled and a max message cache size of 0.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:672:23: warning: static property 'none' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
655 |
656 | /// Represents what the bot is permitted to cache.
657 | public struct CacheManager {
| `- note: consider making struct 'CacheManager' conform to the 'Sendable' protocol
658 |
659 | /// Has all caching capabilities enabled and a max message cache size of 10,000.
:
670 |
671 | /// Has all caching capabilities disabled and a max message cache size of 0.
672 | public static let none = CacheManager(messages: 0, users: false, members: false)
| |- warning: static property 'none' is not concurrency-safe because non-'Sendable' type 'CacheManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'none' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
673 |
674 | /// The amount of messages that are allowed to be cached.
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:349:28: warning: capture of 'self' with non-sendable type 'Bot' in a `@Sendable` closure; this is an error in the Swift 6 language mode
27 |
28 | /// Represents a Discord bot.
29 | public class Bot {
| `- note: class 'Bot' does not conform to the 'Sendable' protocol
30 |
31 | /// Version of the library.
:
347 | if !isConnected {
348 | try! app.eventLoopGroup.any().makeFutureWithTask {
349 | try! await self.gw.startNewSession()
| `- warning: capture of 'self' with non-sendable type 'Bot' in a `@Sendable` closure; this is an error in the Swift 6 language mode
350 | }.wait()
351 | if let onceExecute {
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:202:17: warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
200 | on: elg,
201 | onUpgrade: { socket in
202 | self.websocketSetup(websocket: socket)
| `- warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
203 | Log.message("[Reconnect] connection successful - sending RESUME payload...")
204 | self.sendFrame(resumePayload)
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:204:32: warning: capture of 'resumePayload' with non-sendable type 'JSON' (aka 'Dictionary<String, Any>') in a `@Sendable` closure; this is an error in the Swift 6 language mode
202 | self.websocketSetup(websocket: socket)
203 | Log.message("[Reconnect] connection successful - sending RESUME payload...")
204 | self.sendFrame(resumePayload)
| `- warning: capture of 'resumePayload' with non-sendable type 'JSON' (aka 'Dictionary<String, Any>') in a `@Sendable` closure; this is an error in the Swift 6 language mode
205 | }
206 | ).get()
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:213:45: warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
211 | ws = websocket
212 | receive()
213 | ws.onClose.whenComplete { _ in try! self.websocketClosed() }
| `- warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
214 | }
215 |
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:241:16: warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
239 | // so a 1.1 second delay should be more than enough.
240 | elg.any().scheduleTask(in: .milliseconds(1100)) {
241 | if self.clientHeartbeatAcks > 0 {
| `- warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
242 | self.clientHeartbeatAcks = -1
243 | Log.message("heartbeat ACK (client)")
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:247:31: warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
245 | self.clientHeartbeatAcks = 0
246 | Task {
247 | try await self.danglingReconnect(log: "client did not receive HEARTBEAT ACK after a heartbeat was sent - attempting dangling reconnecting...")
| `- warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
248 | }
249 | }
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:289:17: warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
287 | on: elg,
288 | onUpgrade: { socket in
289 | self.websocketSetup(websocket: socket)
| `- warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
290 | Log.message("gateway connection established - receiver & onClose set")
291 | }
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:366:21: warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
364 | private func receive() {
365 | ws.onText { [unowned self] (_, message) in
366 | defer { receive() }
| `- warning: capture of 'self' with non-sendable type 'Gateway' in a `@Sendable` closure; this is an error in the Swift 6 language mode
367 |
368 | let resumePayload = HTTPClient.strJsonToDict(message)
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:366:21: warning: capture of 'self' with non-sendable type 'Gateway' in an isolated local function; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
364 | private func receive() {
365 | ws.onText { [unowned self] (_, message) in
366 | defer { receive() }
| `- warning: capture of 'self' with non-sendable type 'Gateway' in an isolated local function; this is an error in the Swift 6 language mode
367 |
368 | let resumePayload = HTTPClient.strJsonToDict(message)
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:386:31: warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
384 | else { wsResume?.sequence = gatewayPayload.s! }
385 | Task {
386 | await dispatchAndUpdate(event: event, data: gatewayPayload.d!)
| `- warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
387 | }
388 | }
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:393:21: warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
391 | let reset = { (log: String) -> Void in
392 | Log.message(log)
393 | self.resetGatewayValues(withCancel: false)
| `- warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
394 | }
395 | // Discord states there's no need to re-identify after a RECONNECT
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:432:27: warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
430 |
431 | heartbeatTask = Task(priority: .background, operation: {
432 | await indefHeartbeat()
| `- warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
433 | })
434 |
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:437:34: warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
435 | case Opcode.invalidSession:
436 | Log.message("gateway SESSION INVALIDATED - starting new session...")
437 | Task { try await startNewSession() }
| `- warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
438 |
439 | case Opcode.reconnect:
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:442:30: warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
137 | }
138 |
139 | class Gateway {
| `- note: class 'Gateway' does not conform to the 'Sendable' protocol
140 |
141 | var ws: WebSocket!
:
440 | Log.message("gateway requested RECONNECT - reconnecting...")
441 | receivedReconnectRequest = true
442 | Task { await reconnect() }
| `- warning: capture of 'self' with non-sendable type 'Gateway' in an isolated closure; this is an error in the Swift 6 language mode
443 |
444 | case Opcode.heartbeat:
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Discord.swift:352:22: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
350 | }.wait()
351 | if let onceExecute {
352 | Task { await onceExecute() }
| | `- note: closure captures 'onceExecute' which is accessible to code in the current task
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
353 | self.onceExecute = nil
354 | }
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:300:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
298 | func new(log: String) {
299 | Log.message(log + " - starting new session...")
300 | Task { try await startNewSession() }
| | `- note: closure captures 'self' which is accessible to code in the current task
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
301 | }
302 |
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:354:22: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
352 | if bot.isConnected && !receivedReconnectRequest {
353 | nilClose = true
354 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
355 | try await self.danglingReconnect(log: "gateway disconnected with nil close code - bot connected/no reconnect request - attempting dangling reconnect...")
| `- note: closure captures 'self' which is accessible to code in the current task
356 | }
357 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:385:21: warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> @out τ_0_0 for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
364 | private func receive() {
365 | ws.onText { [unowned self] (_, message) in
366 | defer { receive() }
| `- note: access can happen concurrently
367 |
368 | let resumePayload = HTTPClient.strJsonToDict(message)
:
383 | }
384 | else { wsResume?.sequence = gatewayPayload.s! }
385 | Task {
| `- warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> @out τ_0_0 for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
386 | await dispatchAndUpdate(event: event, data: gatewayPayload.d!)
387 | }
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:431:33: warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> @out τ_0_0 for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
429 | heartbeatTask?.cancel()
430 |
431 | heartbeatTask = Task(priority: .background, operation: {
| | `- warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> @out τ_0_0 for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
| `- note: access can happen concurrently
432 | await indefHeartbeat()
433 | })
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:437:17: warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> (@out τ_0_0, @error any Error) for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
364 | private func receive() {
365 | ws.onText { [unowned self] (_, message) in
366 | defer { receive() }
| `- note: access can happen concurrently
367 |
368 | let resumePayload = HTTPClient.strJsonToDict(message)
:
435 | case Opcode.invalidSession:
436 | Log.message("gateway SESSION INVALIDATED - starting new session...")
437 | Task { try await startNewSession() }
| `- warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> (@out τ_0_0, @error any Error) for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
438 |
439 | case Opcode.reconnect:
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:442:17: warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> @out τ_0_0 for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
364 | private func receive() {
365 | ws.onText { [unowned self] (_, message) in
366 | defer { receive() }
| `- note: access can happen concurrently
367 |
368 | let resumePayload = HTTPClient.strJsonToDict(message)
:
440 | Log.message("gateway requested RECONNECT - reconnecting...")
441 | receivedReconnectRequest = true
442 | Task { await reconnect() }
| `- warning: value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> @out τ_0_0 for <()>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
443 |
444 | case Opcode.heartbeat:
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:920:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
918 | let interaction = Interaction(bot: bot, interactionData: data)
919 | dispatch({ await $0.onInteractionCreate(interaction: interaction) })
920 | Task { await handleInteractions(interaction: interaction) }
| | `- note: closure captures 'self' which is accessible to code in the current task
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
921 |
922 | case .inviteCreate:
/Users/admin/builder/spi-builder-workspace/Sources/Discord/Gateway.swift:1422:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1420 | for element in self {
1421 | guard element.isEnabled else { continue }
1422 | Task { await operation(element) }
| | | `- note: closure captures non-Sendable 'element'
| | `- note: closure captures non-Sendable 'operation'
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1423 | }
1424 | }
Build complete! (101.88s)
warning: 'swift-algorithms': found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
/Users/admin/builder/spi-builder-workspace/.build/checkouts/swift-algorithms/Sources/Algorithms/Documentation.docc
Build complete.
{
"dependencies" : [
{
"identity" : "websocket-kit",
"requirement" : {
"range" : [
{
"lower_bound" : "2.14.0",
"upper_bound" : "3.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/vapor/websocket-kit.git"
},
{
"identity" : "vapor",
"requirement" : {
"range" : [
{
"lower_bound" : "4.84.3",
"upper_bound" : "5.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/vapor/vapor.git"
}
],
"manifest_display_name" : "discord",
"name" : "discord",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "13.0"
}
],
"products" : [
{
"name" : "Discord",
"targets" : [
"Discord"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "DiscordTests",
"module_type" : "SwiftTarget",
"name" : "DiscordTests",
"path" : "Tests/DiscordTests",
"sources" : [
"DiscordTests.swift"
],
"target_dependencies" : [
"Discord"
],
"type" : "test"
},
{
"c99name" : "Discord",
"module_type" : "SwiftTarget",
"name" : "Discord",
"path" : "Sources/Discord",
"product_dependencies" : [
"WebSocketKit",
"Vapor"
],
"product_memberships" : [
"Discord"
],
"sources" : [
"Discord.swift",
"Gateway.swift",
"Http.swift",
"Models/Application.swift",
"Models/Asset.swift",
"Models/AuditLogs.swift",
"Models/AutoModeration.swift",
"Models/Channel.swift",
"Models/Color.swift",
"Models/Components.swift",
"Models/Embed.swift",
"Models/Emoji.swift",
"Models/Error.swift",
"Models/File.swift",
"Models/Guild.swift",
"Models/Intents.swift",
"Models/Interactions.swift",
"Models/Invite.swift",
"Models/Member.swift",
"Models/Message.swift",
"Models/Permissions.swift",
"Models/Role.swift",
"Models/Sticker.swift",
"Models/User.swift",
"Models/Webhook.swift",
"Utils.swift"
],
"type" : "library"
}
],
"tools_version" : "5.8"
}
Done.