Build Information
Successful build of Nifty Dice Roller, reference master (3c0b43
), with Swift 6.1 for Linux on 26 Apr 2025 08:13:43 UTC.
Swift 6 data race errors: 2
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.1-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
Build Log
========================================
RunAll
========================================
Builder version: 4.61.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/NiftyTreeStudios/Nifty-Dice-Roller-cmd.git
Reference: master
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
From https://github.com/NiftyTreeStudios/Nifty-Dice-Roller-cmd
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at 3c0b43d Merge pull request #1 from NiftyTreeStudios/add-license-1
Cloned https://github.com/NiftyTreeStudios/Nifty-Dice-Roller-cmd.git
Revision (git rev-parse @):
3c0b43d7d1897173a7290b4801b6e813e0410de3
SUCCESS checkout https://github.com/NiftyTreeStudios/Nifty-Dice-Roller-cmd.git at master
========================================
Build
========================================
Selected platform: linux
Swift version: 6.1
Building package at path: $PWD
https://github.com/NiftyTreeStudios/Nifty-Dice-Roller-cmd.git
https://github.com/NiftyTreeStudios/Nifty-Dice-Roller-cmd.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
"dependencies" : [
{
"identity" : "swift-argument-parser",
"requirement" : {
"range" : [
{
"lower_bound" : "0.3.0",
"upper_bound" : "0.4.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/apple/swift-argument-parser"
}
],
"manifest_display_name" : "Nifty Dice Roller",
"name" : "Nifty Dice Roller",
"path" : "/host/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "10.15"
},
{
"name" : "ios",
"version" : "13.0"
}
],
"products" : [
{
"name" : "ndr",
"targets" : [
"diceroller"
],
"type" : {
"executable" : null
}
}
],
"targets" : [
{
"c99name" : "dicerollerTests",
"module_type" : "SwiftTarget",
"name" : "dicerollerTests",
"path" : "Tests/dicerollerTests",
"sources" : [
"XCTestManifests.swift",
"dicerollerTests.swift"
],
"target_dependencies" : [
"diceroller"
],
"type" : "test"
},
{
"c99name" : "diceroller",
"module_type" : "SwiftTarget",
"name" : "diceroller",
"path" : "Sources/diceroller",
"product_dependencies" : [
"ArgumentParser"
],
"product_memberships" : [
"ndr"
],
"sources" : [
"main.swift"
],
"type" : "executable"
}
],
"tools_version" : "5.2"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.1-latest swift build --triple x86_64-unknown-linux-gnu -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 2>&1
basic-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:3bdcac04179f4ed3e5b8e9dbd6e74bbf5ebc0f4fde48bbaad7d1e5c757e65bcb
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.1-latest
Fetching https://github.com/apple/swift-argument-parser
[1/14937] Fetching swift-argument-parser
Fetched https://github.com/apple/swift-argument-parser from cache (1.19s)
Computing version for https://github.com/apple/swift-argument-parser
Computed https://github.com/apple/swift-argument-parser at 0.3.2 (2.18s)
Creating working copy for https://github.com/apple/swift-argument-parser
Working copy of https://github.com/apple/swift-argument-parser resolved at 0.3.2
Building for debugging...
[0/7] Write sources
[2/7] Write swift-version-24593BA9C3E375BF.txt
[4/39] Emitting module ArgumentParser
[5/43] Compiling ArgumentParser ArgumentDefinition.swift
[6/43] Compiling ArgumentParser ArgumentSet.swift
[7/43] Compiling ArgumentParser CommandParser.swift
[8/43] Compiling ArgumentParser InputOrigin.swift
[9/43] Compiling ArgumentParser ParsableArguments.swift
[10/43] Compiling ArgumentParser ParsableArgumentsValidation.swift
[11/43] Compiling ArgumentParser ParsableCommand.swift
[12/43] Compiling ArgumentParser ArgumentDecoder.swift
[13/43] Compiling ArgumentParser ArgumentHelp.swift
[14/43] Compiling ArgumentParser CompletionKind.swift
[15/43] Compiling ArgumentParser Errors.swift
[16/43] Compiling ArgumentParser Flag.swift
[17/43] Compiling ArgumentParser NameSpecification.swift
[18/43] Compiling ArgumentParser UsageGenerator.swift
[19/43] Compiling ArgumentParser SequenceExtensions.swift
[20/43] Compiling ArgumentParser StringExtensions.swift
[21/43] Compiling ArgumentParser Tree.swift
[22/43] Compiling ArgumentParser BashCompletionsGenerator.swift
[23/43] Compiling ArgumentParser CompletionsGenerator.swift
[24/43] Compiling ArgumentParser FishCompletionsGenerator.swift
[25/43] Compiling ArgumentParser ZshCompletionsGenerator.swift
[26/43] Compiling ArgumentParser Argument.swift
[27/43] Compiling ArgumentParser Option.swift
[28/43] Compiling ArgumentParser OptionGroup.swift
[29/43] Compiling ArgumentParser CommandConfiguration.swift
[30/43] Compiling ArgumentParser EnumerableFlag.swift
[31/43] Compiling ArgumentParser ExpressibleByArgument.swift
[32/43] Compiling ArgumentParser SplitArguments.swift
[33/43] Compiling ArgumentParser HelpCommand.swift
[34/43] Compiling ArgumentParser HelpGenerator.swift
[35/43] Compiling ArgumentParser MessageInfo.swift
[36/43] Compiling ArgumentParser Name.swift
[37/43] Compiling ArgumentParser Parsed.swift
[38/43] Compiling ArgumentParser ParsedValues.swift
[39/43] Compiling ArgumentParser ParserError.swift
[40/44] Wrapping AST for ArgumentParser for debugging
[42/46] Emitting module diceroller
/host/spi-builder-workspace/Sources/diceroller/main.swift:42:16: warning: static property 'configuration' is not concurrency-safe because non-'Sendable' type 'CommandConfiguration' may have shared mutable state; this is an error in the Swift 6 language mode
40 |
41 | struct NDR: ParsableCommand {
42 | static let configuration = CommandConfiguration(
| `- warning: static property 'configuration' is not concurrency-safe because non-'Sendable' type 'CommandConfiguration' may have shared mutable state; this is an error in the Swift 6 language mode
43 | abstract: "A Swift command-line tool to roll die",
44 | subcommands: [Roll.self])
/host/spi-builder-workspace/.build/checkouts/swift-argument-parser/Sources/ArgumentParser/Parsable Types/CommandConfiguration.swift:13:15: note: struct 'CommandConfiguration' does not conform to the 'Sendable' protocol
11 |
12 | /// The configuration for a command.
13 | public struct CommandConfiguration {
| `- note: struct 'CommandConfiguration' does not conform to the 'Sendable' protocol
14 | /// The name of the command to use on the command line.
15 | ///
/host/spi-builder-workspace/Sources/diceroller/main.swift:1:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'ArgumentParser'
1 | import ArgumentParser
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'ArgumentParser'
2 | import Foundation
3 |
:
40 |
41 | struct NDR: ParsableCommand {
42 | static let configuration = CommandConfiguration(
| |- note: add '@MainActor' to make static property 'configuration' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
43 | abstract: "A Swift command-line tool to roll die",
44 | subcommands: [Roll.self])
/host/spi-builder-workspace/Sources/diceroller/main.swift:51:23: warning: static property 'configuration' is not concurrency-safe because non-'Sendable' type 'CommandConfiguration' may have shared mutable state; this is an error in the Swift 6 language mode
49 | struct Roll: ParsableCommand {
50 |
51 | public static let configuration = CommandConfiguration(abstract: "A Swift command-line tool to roll die")
| |- warning: static property 'configuration' is not concurrency-safe because non-'Sendable' type 'CommandConfiguration' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'configuration' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
52 |
53 | @Argument(help: "What to roll: the amount of die, type of die (and modifier) -> 2d20+6")
/host/spi-builder-workspace/.build/checkouts/swift-argument-parser/Sources/ArgumentParser/Parsable Types/CommandConfiguration.swift:13:15: note: struct 'CommandConfiguration' does not conform to the 'Sendable' protocol
11 |
12 | /// The configuration for a command.
13 | public struct CommandConfiguration {
| `- note: struct 'CommandConfiguration' does not conform to the 'Sendable' protocol
14 | /// The name of the command to use on the command line.
15 | ///
[43/46] Compiling diceroller main.swift
/host/spi-builder-workspace/Sources/diceroller/main.swift:42:16: warning: static property 'configuration' is not concurrency-safe because non-'Sendable' type 'CommandConfiguration' may have shared mutable state; this is an error in the Swift 6 language mode
40 |
41 | struct NDR: ParsableCommand {
42 | static let configuration = CommandConfiguration(
| `- warning: static property 'configuration' is not concurrency-safe because non-'Sendable' type 'CommandConfiguration' may have shared mutable state; this is an error in the Swift 6 language mode
43 | abstract: "A Swift command-line tool to roll die",
44 | subcommands: [Roll.self])
/host/spi-builder-workspace/.build/checkouts/swift-argument-parser/Sources/ArgumentParser/Parsable Types/CommandConfiguration.swift:13:15: note: struct 'CommandConfiguration' does not conform to the 'Sendable' protocol
11 |
12 | /// The configuration for a command.
13 | public struct CommandConfiguration {
| `- note: struct 'CommandConfiguration' does not conform to the 'Sendable' protocol
14 | /// The name of the command to use on the command line.
15 | ///
/host/spi-builder-workspace/Sources/diceroller/main.swift:1:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'ArgumentParser'
1 | import ArgumentParser
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'ArgumentParser'
2 | import Foundation
3 |
:
40 |
41 | struct NDR: ParsableCommand {
42 | static let configuration = CommandConfiguration(
| |- note: add '@MainActor' to make static property 'configuration' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
43 | abstract: "A Swift command-line tool to roll die",
44 | subcommands: [Roll.self])
/host/spi-builder-workspace/Sources/diceroller/main.swift:51:23: warning: static property 'configuration' is not concurrency-safe because non-'Sendable' type 'CommandConfiguration' may have shared mutable state; this is an error in the Swift 6 language mode
49 | struct Roll: ParsableCommand {
50 |
51 | public static let configuration = CommandConfiguration(abstract: "A Swift command-line tool to roll die")
| |- warning: static property 'configuration' is not concurrency-safe because non-'Sendable' type 'CommandConfiguration' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'configuration' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
52 |
53 | @Argument(help: "What to roll: the amount of die, type of die (and modifier) -> 2d20+6")
/host/spi-builder-workspace/.build/checkouts/swift-argument-parser/Sources/ArgumentParser/Parsable Types/CommandConfiguration.swift:13:15: note: struct 'CommandConfiguration' does not conform to the 'Sendable' protocol
11 |
12 | /// The configuration for a command.
13 | public struct CommandConfiguration {
| `- note: struct 'CommandConfiguration' does not conform to the 'Sendable' protocol
14 | /// The name of the command to use on the command line.
15 | ///
/host/spi-builder-workspace/Sources/diceroller/main.swift:35:9: error: main actor-isolated var 'rolledDie' can not be mutated from a nonisolated context
6 | var modifier: Int = 0
7 | var total: Int = 0
8 | var rolledDie: [String] = []
| `- note: mutation of this var is only permitted within the actor
9 |
10 | func separateArguments(roll: String) -> (Int, Int, Int) {
:
28 | }
29 |
30 | func calculateRoll(dieAmount: Int, dieType: Int, modifier: Int) -> Int {
| `- note: add '@MainActor' to make global function 'calculateRoll(dieAmount:dieType:modifier:)' part of global actor 'MainActor'
31 | var calculatedTotal: Int = 0
32 | for _ in 1...dieAmount {
33 | let roll = Int.random(in: 1...dieType)
34 | calculatedTotal += roll
35 | rolledDie.append("d\(dieType): \(roll)")
| `- error: main actor-isolated var 'rolledDie' can not be mutated from a nonisolated context
36 | }
37 | calculatedTotal += modifier
/host/spi-builder-workspace/Sources/diceroller/main.swift:66:14: error: main actor-isolated var 'dieAmount' can not be referenced from a nonisolated context
2 | import Foundation
3 |
4 | var dieAmount: Int = 1
| `- note: var declared here
5 | var dieType: Int = 1
6 | var modifier: Int = 0
:
57 | private var detailed: Bool = false
58 |
59 | func run() throws {
| `- note: add '@MainActor' to make instance method 'run()' part of global actor 'MainActor'
60 | let range = NSRange(location: 0, length: rollArguments.utf16.count)
61 | let regex = try! NSRegularExpression(pattern: "^[0-9]+d[0-9]+[-+]*[0-9]*")
:
64 | return
65 | } else {
66 | (dieAmount, dieType, modifier) = (separateArguments(roll: rollArguments))
| `- error: main actor-isolated var 'dieAmount' can not be referenced from a nonisolated context
67 | total = calculateRoll(dieAmount: dieAmount, dieType: dieType, modifier: modifier)
68 | print("Rolling...")
/host/spi-builder-workspace/Sources/diceroller/main.swift:66:25: error: main actor-isolated var 'dieType' can not be referenced from a nonisolated context
3 |
4 | var dieAmount: Int = 1
5 | var dieType: Int = 1
| `- note: var declared here
6 | var modifier: Int = 0
7 | var total: Int = 0
:
57 | private var detailed: Bool = false
58 |
59 | func run() throws {
| `- note: add '@MainActor' to make instance method 'run()' part of global actor 'MainActor'
60 | let range = NSRange(location: 0, length: rollArguments.utf16.count)
61 | let regex = try! NSRegularExpression(pattern: "^[0-9]+d[0-9]+[-+]*[0-9]*")
:
64 | return
65 | } else {
66 | (dieAmount, dieType, modifier) = (separateArguments(roll: rollArguments))
| `- error: main actor-isolated var 'dieType' can not be referenced from a nonisolated context
67 | total = calculateRoll(dieAmount: dieAmount, dieType: dieType, modifier: modifier)
68 | print("Rolling...")
/host/spi-builder-workspace/Sources/diceroller/main.swift:66:34: error: main actor-isolated var 'modifier' can not be referenced from a nonisolated context
4 | var dieAmount: Int = 1
5 | var dieType: Int = 1
6 | var modifier: Int = 0
| `- note: var declared here
7 | var total: Int = 0
8 | var rolledDie: [String] = []
:
57 | private var detailed: Bool = false
58 |
59 | func run() throws {
| `- note: add '@MainActor' to make instance method 'run()' part of global actor 'MainActor'
60 | let range = NSRange(location: 0, length: rollArguments.utf16.count)
61 | let regex = try! NSRegularExpression(pattern: "^[0-9]+d[0-9]+[-+]*[0-9]*")
:
64 | return
65 | } else {
66 | (dieAmount, dieType, modifier) = (separateArguments(roll: rollArguments))
| `- error: main actor-isolated var 'modifier' can not be referenced from a nonisolated context
67 | total = calculateRoll(dieAmount: dieAmount, dieType: dieType, modifier: modifier)
68 | print("Rolling...")
/host/spi-builder-workspace/Sources/diceroller/main.swift:67:13: error: main actor-isolated var 'total' can not be mutated from a nonisolated context
5 | var dieType: Int = 1
6 | var modifier: Int = 0
7 | var total: Int = 0
| `- note: mutation of this var is only permitted within the actor
8 | var rolledDie: [String] = []
9 |
:
57 | private var detailed: Bool = false
58 |
59 | func run() throws {
| `- note: add '@MainActor' to make instance method 'run()' part of global actor 'MainActor'
60 | let range = NSRange(location: 0, length: rollArguments.utf16.count)
61 | let regex = try! NSRegularExpression(pattern: "^[0-9]+d[0-9]+[-+]*[0-9]*")
:
65 | } else {
66 | (dieAmount, dieType, modifier) = (separateArguments(roll: rollArguments))
67 | total = calculateRoll(dieAmount: dieAmount, dieType: dieType, modifier: modifier)
| `- error: main actor-isolated var 'total' can not be mutated from a nonisolated context
68 | print("Rolling...")
69 | if detailed {
/host/spi-builder-workspace/Sources/diceroller/main.swift:67:46: error: main actor-isolated var 'dieAmount' can not be referenced from a nonisolated context
2 | import Foundation
3 |
4 | var dieAmount: Int = 1
| `- note: var declared here
5 | var dieType: Int = 1
6 | var modifier: Int = 0
:
57 | private var detailed: Bool = false
58 |
59 | func run() throws {
| `- note: add '@MainActor' to make instance method 'run()' part of global actor 'MainActor'
60 | let range = NSRange(location: 0, length: rollArguments.utf16.count)
61 | let regex = try! NSRegularExpression(pattern: "^[0-9]+d[0-9]+[-+]*[0-9]*")
:
65 | } else {
66 | (dieAmount, dieType, modifier) = (separateArguments(roll: rollArguments))
67 | total = calculateRoll(dieAmount: dieAmount, dieType: dieType, modifier: modifier)
| `- error: main actor-isolated var 'dieAmount' can not be referenced from a nonisolated context
68 | print("Rolling...")
69 | if detailed {
/host/spi-builder-workspace/Sources/diceroller/main.swift:67:66: error: main actor-isolated var 'dieType' can not be referenced from a nonisolated context
3 |
4 | var dieAmount: Int = 1
5 | var dieType: Int = 1
| `- note: var declared here
6 | var modifier: Int = 0
7 | var total: Int = 0
:
57 | private var detailed: Bool = false
58 |
59 | func run() throws {
| `- note: add '@MainActor' to make instance method 'run()' part of global actor 'MainActor'
60 | let range = NSRange(location: 0, length: rollArguments.utf16.count)
61 | let regex = try! NSRegularExpression(pattern: "^[0-9]+d[0-9]+[-+]*[0-9]*")
:
65 | } else {
66 | (dieAmount, dieType, modifier) = (separateArguments(roll: rollArguments))
67 | total = calculateRoll(dieAmount: dieAmount, dieType: dieType, modifier: modifier)
| `- error: main actor-isolated var 'dieType' can not be referenced from a nonisolated context
68 | print("Rolling...")
69 | if detailed {
/host/spi-builder-workspace/Sources/diceroller/main.swift:67:85: error: main actor-isolated var 'modifier' can not be referenced from a nonisolated context
4 | var dieAmount: Int = 1
5 | var dieType: Int = 1
6 | var modifier: Int = 0
| `- note: var declared here
7 | var total: Int = 0
8 | var rolledDie: [String] = []
:
57 | private var detailed: Bool = false
58 |
59 | func run() throws {
| `- note: add '@MainActor' to make instance method 'run()' part of global actor 'MainActor'
60 | let range = NSRange(location: 0, length: rollArguments.utf16.count)
61 | let regex = try! NSRegularExpression(pattern: "^[0-9]+d[0-9]+[-+]*[0-9]*")
:
65 | } else {
66 | (dieAmount, dieType, modifier) = (separateArguments(roll: rollArguments))
67 | total = calculateRoll(dieAmount: dieAmount, dieType: dieType, modifier: modifier)
| `- error: main actor-isolated var 'modifier' can not be referenced from a nonisolated context
68 | print("Rolling...")
69 | if detailed {
/host/spi-builder-workspace/Sources/diceroller/main.swift:70:34: error: main actor-isolated var 'dieType' can not be referenced from a nonisolated context
3 |
4 | var dieAmount: Int = 1
5 | var dieType: Int = 1
| `- note: var declared here
6 | var modifier: Int = 0
7 | var total: Int = 0
:
57 | private var detailed: Bool = false
58 |
59 | func run() throws {
| `- note: add '@MainActor' to make instance method 'run()' part of global actor 'MainActor'
60 | let range = NSRange(location: 0, length: rollArguments.utf16.count)
61 | let regex = try! NSRegularExpression(pattern: "^[0-9]+d[0-9]+[-+]*[0-9]*")
:
68 | print("Rolling...")
69 | if detailed {
70 | print("Rolled d\(dieType) \(dieAmount) times with modifier of \(modifier)")
| `- error: main actor-isolated var 'dieType' can not be referenced from a nonisolated context
71 | print("Individual rolls \(rolledDie)")
72 | }
/host/spi-builder-workspace/Sources/diceroller/main.swift:70:45: error: main actor-isolated var 'dieAmount' can not be referenced from a nonisolated context
2 | import Foundation
3 |
4 | var dieAmount: Int = 1
| `- note: var declared here
5 | var dieType: Int = 1
6 | var modifier: Int = 0
:
57 | private var detailed: Bool = false
58 |
59 | func run() throws {
| `- note: add '@MainActor' to make instance method 'run()' part of global actor 'MainActor'
60 | let range = NSRange(location: 0, length: rollArguments.utf16.count)
61 | let regex = try! NSRegularExpression(pattern: "^[0-9]+d[0-9]+[-+]*[0-9]*")
:
68 | print("Rolling...")
69 | if detailed {
70 | print("Rolled d\(dieType) \(dieAmount) times with modifier of \(modifier)")
| `- error: main actor-isolated var 'dieAmount' can not be referenced from a nonisolated context
71 | print("Individual rolls \(rolledDie)")
72 | }
/host/spi-builder-workspace/Sources/diceroller/main.swift:70:81: error: main actor-isolated var 'modifier' can not be referenced from a nonisolated context
4 | var dieAmount: Int = 1
5 | var dieType: Int = 1
6 | var modifier: Int = 0
| `- note: var declared here
7 | var total: Int = 0
8 | var rolledDie: [String] = []
:
57 | private var detailed: Bool = false
58 |
59 | func run() throws {
| `- note: add '@MainActor' to make instance method 'run()' part of global actor 'MainActor'
60 | let range = NSRange(location: 0, length: rollArguments.utf16.count)
61 | let regex = try! NSRegularExpression(pattern: "^[0-9]+d[0-9]+[-+]*[0-9]*")
:
68 | print("Rolling...")
69 | if detailed {
70 | print("Rolled d\(dieType) \(dieAmount) times with modifier of \(modifier)")
| `- error: main actor-isolated var 'modifier' can not be referenced from a nonisolated context
71 | print("Individual rolls \(rolledDie)")
72 | }
/host/spi-builder-workspace/Sources/diceroller/main.swift:71:43: error: main actor-isolated var 'rolledDie' can not be referenced from a nonisolated context
6 | var modifier: Int = 0
7 | var total: Int = 0
8 | var rolledDie: [String] = []
| `- note: var declared here
9 |
10 | func separateArguments(roll: String) -> (Int, Int, Int) {
:
57 | private var detailed: Bool = false
58 |
59 | func run() throws {
| `- note: add '@MainActor' to make instance method 'run()' part of global actor 'MainActor'
60 | let range = NSRange(location: 0, length: rollArguments.utf16.count)
61 | let regex = try! NSRegularExpression(pattern: "^[0-9]+d[0-9]+[-+]*[0-9]*")
:
69 | if detailed {
70 | print("Rolled d\(dieType) \(dieAmount) times with modifier of \(modifier)")
71 | print("Individual rolls \(rolledDie)")
| `- error: main actor-isolated var 'rolledDie' can not be referenced from a nonisolated context
72 | }
73 | print("Amount rolled: \(total)")
/host/spi-builder-workspace/Sources/diceroller/main.swift:73:37: error: main actor-isolated var 'total' can not be referenced from a nonisolated context
5 | var dieType: Int = 1
6 | var modifier: Int = 0
7 | var total: Int = 0
| `- note: var declared here
8 | var rolledDie: [String] = []
9 |
:
57 | private var detailed: Bool = false
58 |
59 | func run() throws {
| `- note: add '@MainActor' to make instance method 'run()' part of global actor 'MainActor'
60 | let range = NSRange(location: 0, length: rollArguments.utf16.count)
61 | let regex = try! NSRegularExpression(pattern: "^[0-9]+d[0-9]+[-+]*[0-9]*")
:
71 | print("Individual rolls \(rolledDie)")
72 | }
73 | print("Amount rolled: \(total)")
| `- error: main actor-isolated var 'total' can not be referenced from a nonisolated context
74 | }
75 | }
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.1-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
basic-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:3bdcac04179f4ed3e5b8e9dbd6e74bbf5ebc0f4fde48bbaad7d1e5c757e65bcb
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.1-latest
[0/1] Planning build
Building for debugging...
[0/5] Write swift-version-24593BA9C3E375BF.txt
[2/37] Compiling ArgumentParser Name.swift
[3/37] Compiling ArgumentParser Parsed.swift
[4/37] Compiling ArgumentParser ParsedValues.swift
[5/37] Compiling ArgumentParser ParserError.swift
[6/37] Compiling ArgumentParser SplitArguments.swift
[7/37] Compiling ArgumentParser HelpCommand.swift
[8/37] Compiling ArgumentParser HelpGenerator.swift
[9/37] Compiling ArgumentParser MessageInfo.swift
[10/41] Compiling ArgumentParser ArgumentHelp.swift
[11/41] Compiling ArgumentParser CompletionKind.swift
[12/41] Compiling ArgumentParser Errors.swift
[13/41] Compiling ArgumentParser Flag.swift
[14/41] Compiling ArgumentParser NameSpecification.swift
[15/41] Compiling ArgumentParser Option.swift
[16/41] Compiling ArgumentParser OptionGroup.swift
[17/41] Compiling ArgumentParser CommandConfiguration.swift
[18/41] Compiling ArgumentParser EnumerableFlag.swift
[19/41] Compiling ArgumentParser ExpressibleByArgument.swift
[20/41] Compiling ArgumentParser ParsableArguments.swift
[21/41] Compiling ArgumentParser ParsableArgumentsValidation.swift
[22/41] Compiling ArgumentParser ParsableCommand.swift
[23/41] Compiling ArgumentParser ArgumentDecoder.swift
[24/41] Compiling ArgumentParser ArgumentDefinition.swift
[25/41] Compiling ArgumentParser ArgumentSet.swift
[26/41] Compiling ArgumentParser CommandParser.swift
[27/41] Compiling ArgumentParser InputOrigin.swift
[28/41] Compiling ArgumentParser BashCompletionsGenerator.swift
[29/41] Compiling ArgumentParser CompletionsGenerator.swift
[30/41] Compiling ArgumentParser FishCompletionsGenerator.swift
[31/41] Compiling ArgumentParser ZshCompletionsGenerator.swift
[32/41] Compiling ArgumentParser Argument.swift
[33/41] Emitting module ArgumentParser
[34/41] Compiling ArgumentParser UsageGenerator.swift
[35/41] Compiling ArgumentParser SequenceExtensions.swift
[36/41] Compiling ArgumentParser StringExtensions.swift
[37/41] Compiling ArgumentParser Tree.swift
[38/42] Wrapping AST for ArgumentParser for debugging
[40/44] Emitting module diceroller
[41/44] Compiling diceroller main.swift
[42/45] Wrapping AST for diceroller for debugging
[43/45] Write Objects.LinkFileList
[44/45] Linking ndr
Build complete! (10.19s)
Build complete.
{
"dependencies" : [
{
"identity" : "swift-argument-parser",
"requirement" : {
"range" : [
{
"lower_bound" : "0.3.0",
"upper_bound" : "0.4.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/apple/swift-argument-parser"
}
],
"manifest_display_name" : "Nifty Dice Roller",
"name" : "Nifty Dice Roller",
"path" : "/host/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "10.15"
},
{
"name" : "ios",
"version" : "13.0"
}
],
"products" : [
{
"name" : "ndr",
"targets" : [
"diceroller"
],
"type" : {
"executable" : null
}
}
],
"targets" : [
{
"c99name" : "dicerollerTests",
"module_type" : "SwiftTarget",
"name" : "dicerollerTests",
"path" : "Tests/dicerollerTests",
"sources" : [
"XCTestManifests.swift",
"dicerollerTests.swift"
],
"target_dependencies" : [
"diceroller"
],
"type" : "test"
},
{
"c99name" : "diceroller",
"module_type" : "SwiftTarget",
"name" : "diceroller",
"path" : "Sources/diceroller",
"product_dependencies" : [
"ArgumentParser"
],
"product_memberships" : [
"ndr"
],
"sources" : [
"main.swift"
],
"type" : "executable"
}
],
"tools_version" : "5.2"
}
basic-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:3bdcac04179f4ed3e5b8e9dbd6e74bbf5ebc0f4fde48bbaad7d1e5c757e65bcb
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.1-latest
Done.