Build Information
Failed to build SwiftGodotKit, reference 4.3.5 (1a720b
), with Swift 6.0 for Linux on 2 Dec 2024 00:23:52 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-2":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -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
Build Log
========================================
RunAll
========================================
Builder version: 4.58.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/migueldeicaza/SwiftGodotKit.git
Reference: 4.3.5
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/migueldeicaza/SwiftGodotKit
* tag 4.3.5 -> FETCH_HEAD
HEAD is now at 1a720b3 Update README.md
Cloned https://github.com/migueldeicaza/SwiftGodotKit.git
Revision (git rev-parse @):
1a720b3be1d4b9f87f97c40d03e6ecf735768162
SUCCESS checkout https://github.com/migueldeicaza/SwiftGodotKit.git at 4.3.5
========================================
Build
========================================
Selected platform: linux
Swift version: 6.0
Building package at path: $PWD
https://github.com/migueldeicaza/SwiftGodotKit.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-2":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -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.0-latest: Pulling from finestructure/spi-images
Digest: sha256:47d26c99ca4f1ac0a332c85fd5b13ff4390e72115219984a57a68fe9d1063a05
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.0-latest
Fetching https://github.com/migueldeicaza/SwiftGodot
[1/10289] Fetching swiftgodot
Fetched https://github.com/migueldeicaza/SwiftGodot from cache (4.42s)
Fetching https://github.com/apple/swift-syntax
[1/66777] Fetching swift-syntax
Fetched https://github.com/apple/swift-syntax from cache (4.02s)
Computing version for https://github.com/apple/swift-syntax
Computed https://github.com/apple/swift-syntax at 510.0.3 (1.93s)
Creating working copy for https://github.com/apple/swift-syntax
Working copy of https://github.com/apple/swift-syntax resolved at 510.0.3
Creating working copy for https://github.com/migueldeicaza/SwiftGodot
Working copy of https://github.com/migueldeicaza/SwiftGodot resolved at fe24cb01640c2d4d48c8555a71adfe346d9543cf
[858/63904068] Downloading https://github.com/migueldeicaza/SwiftGodotKit/releases/download/v1.1.0/libgodot.xcframework.zip
Downloading binary artifact https://github.com/migueldeicaza/SwiftGodotKit/releases/download/v1.1.0/libgodot.xcframework.zip
Downloaded https://github.com/migueldeicaza/SwiftGodotKit/releases/download/v1.1.0/libgodot.xcframework.zip (6.49s)
Building for debugging...
[0/7] Write sources
[2/7] Write swift-version-24593BA9C3E375BF.txt
[4/10] Compiling ExtensionApi ApiJsonModel.swift
[5/10] Compiling ExtensionApi ApiJsonModel+Extra.swift
[6/10] Emitting module ExtensionApi
[7/11] Wrapping AST for ExtensionApi for debugging
[9/23] Compiling Generator UtilityGen.swift
[10/24] Compiling Generator TypeHelpers.swift
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/TypeHelpers.swift:64:28: error: main actor-isolated var 'globalEnums' can not be referenced from a nonisolated context
43 | /// enum value, or nil if it can not be found.
44 | /// Example type: "ArrowDirection", value: "0" would return ".up"
45 | func mapEnumValue (enumDef: String, value: String) -> String? {
| `- note: add '@MainActor' to make global function 'mapEnumValue(enumDef:value:)' part of global actor 'MainActor'
46 | func findEnumMatch (element: JGodotGlobalEnumElement) -> String? {
47 | let enumCasePrefix = element.values.commonPrefix()
:
62 | }
63 | let t = enumDef.dropFirst(6)
64 | if let globalEnumDef = globalEnums [String (t)] {
| `- error: main actor-isolated var 'globalEnums' can not be referenced from a nonisolated context
65 | return findEnumMatch(element: globalEnumDef)
66 | }
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:57:5: note: var declared here
55 | }
56 |
57 | var globalEnums: [String: JGodotGlobalEnumElement] = [:]
| `- note: var declared here
58 |
59 | print ("Running with projectDir=$(projectDir) and output=\(outputDir)")
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/TypeHelpers.swift:73:19: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
43 | /// enum value, or nil if it can not be found.
44 | /// Example type: "ArrowDirection", value: "0" would return ".up"
45 | func mapEnumValue (enumDef: String, value: String) -> String? {
| `- note: add '@MainActor' to make global function 'mapEnumValue(enumDef:value:)' part of global actor 'MainActor'
46 | func findEnumMatch (element: JGodotGlobalEnumElement) -> String? {
47 | let enumCasePrefix = element.values.commonPrefix()
:
71 | let type = t [t.startIndex..<p]
72 | let enumt = t [t.index(p, offsetBy: 1)...]
73 | guard let x = classMap [String (type)] else {
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
74 | print ("WARNING: Enum, could not find type \(type) for \(enumDef)")
75 | return nil
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/TypeHelpers.swift:335:16: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
233 | ///
234 | ///
235 | func getGodotType (_ t: TypeWithMeta?, kind: ArgumentKind = .classes) -> String {
| `- note: add '@MainActor' to make global function 'getGodotType(_:kind:)' part of global actor 'MainActor'
236 | guard let t else {
237 | return ""
:
333 | let nested = SimpleType(type: nestedTypeName, meta: nil)
334 |
335 | if classMap [nestedTypeName] != nil {
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
336 | return "ObjectCollection<\(getGodotType (nested))>"
337 | } else {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/TypeHelpers.swift:353:22: error: main actor-isolated var 'builtinSizes' can not be referenced from a nonisolated context
350 | /// containing the Swift-type that is used to store this, and a suitable initialization
351 | /// value for it.
352 | func getBuiltinStorage (_ name: String) -> (String, String) {
| `- note: add '@MainActor' to make global function 'getBuiltinStorage' part of global actor 'MainActor'
353 | guard let size = builtinSizes [name] else {
| `- error: main actor-isolated var 'builtinSizes' can not be referenced from a nonisolated context
354 | fatalError()
355 | }
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:89:5: note: var declared here
87 |
88 | let buildConfiguration: String = "float_64"
89 | var builtinSizes: [String: Int] = [:]
| `- note: var declared here
90 | for cs in jsonApi.builtinClassSizes {
91 | if cs.buildConfiguration == buildConfiguration {
[11/24] Compiling Generator StringOperations.swift
[12/24] Compiling Generator MethodGen.swift
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/MethodGen.swift:180:42: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
86 | /// - usedMethods: a set of methods that have been referenced by properties, to determine whether we make this public or private
87 | /// - Returns: nil, or the method we surfaced that needs to have the virtual supporting infrastructured wired up
88 | func methodGen (_ p: Printer, method: MethodDefinition, className: String, cdef: JClassInfo?, usedMethods: Set<String>, kind: MethodGenType, asSingleton: Bool) -> String? {
| `- note: add '@MainActor' to make global function 'methodGen(_:method:className:cdef:usedMethods:kind:asSingleton:)' part of global actor 'MainActor'
89 | var registerVirtualMethodName: String? = nil
90 |
:
178 | }
179 | let godotReturnType = method.returnValue?.type
180 | let godotReturnTypeIsReferenceType = classMap [godotReturnType ?? ""] != nil
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
181 | let returnOptional = godotReturnTypeIsReferenceType && isReturnOptional(className: className, method: method.name)
182 | let returnType = getGodotType (method.returnValue) + (returnOptional ? "?" : "")
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/MethodGen.swift:241:27: error: main actor-isolated var 'builtinSizes' can not be referenced from a nonisolated context
223 | }
224 |
225 | func getResultPtr() -> String {
| `- note: add '@MainActor' to make local function 'getResultPtr()' part of global actor 'MainActor'
226 | let ptrResult: String
227 | if returnType != "" {
:
239 | } else if frameworkType {
240 | ptrResult = "&_result"
241 | } else if builtinSizes [godotReturnType] != nil {
| `- error: main actor-isolated var 'builtinSizes' can not be referenced from a nonisolated context
242 | ptrResult = "&_result.content"
243 | } else {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:89:5: note: var declared here
87 |
88 | let buildConfiguration: String = "float_64"
89 | var builtinSizes: [String: Int] = [:]
| `- note: var declared here
90 | for cs in jsonApi.builtinClassSizes {
91 | if cs.buildConfiguration == buildConfiguration {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/MethodGen.swift:340:16: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
86 | /// - usedMethods: a set of methods that have been referenced by properties, to determine whether we make this public or private
87 | /// - Returns: nil, or the method we surfaced that needs to have the virtual supporting infrastructured wired up
88 | func methodGen (_ p: Printer, method: MethodDefinition, className: String, cdef: JClassInfo?, usedMethods: Set<String>, kind: MethodGenType, asSingleton: Bool) -> String? {
| `- note: add '@MainActor' to make global function 'methodGen(_:method:className:cdef:usedMethods:kind:asSingleton:)' part of global actor 'MainActor'
89 | var registerVirtualMethodName: String? = nil
90 |
:
338 | if args != "" { args += ", " }
339 | var isRefOptional = false
340 | if classMap [arg.type] != nil {
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
341 | isRefOptional = isRefParameterOptional (className: className, method: method.name, arg: arg.name)
342 | }
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/MethodGen.swift:426:20: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
86 | /// - usedMethods: a set of methods that have been referenced by properties, to determine whether we make this public or private
87 | /// - Returns: nil, or the method we surfaced that needs to have the virtual supporting infrastructured wired up
88 | func methodGen (_ p: Printer, method: MethodDefinition, className: String, cdef: JClassInfo?, usedMethods: Set<String>, kind: MethodGenType, asSingleton: Bool) -> String? {
| `- note: add '@MainActor' to make global function 'methodGen(_:method:className:cdef:usedMethods:kind:asSingleton:)' part of global actor 'MainActor'
89 | var registerVirtualMethodName: String? = nil
90 |
:
424 | } else {
425 | argref = escapeSwift (snakeToCamel (arg.name))
426 | if isStructMap [arg.type] ?? false {
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
427 | optstorage = ""
428 | } else {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/MethodGen.swift:429:24: error: main actor-isolated var 'builtinSizes' can not be referenced from a nonisolated context
86 | /// - usedMethods: a set of methods that have been referenced by properties, to determine whether we make this public or private
87 | /// - Returns: nil, or the method we surfaced that needs to have the virtual supporting infrastructured wired up
88 | func methodGen (_ p: Printer, method: MethodDefinition, className: String, cdef: JClassInfo?, usedMethods: Set<String>, kind: MethodGenType, asSingleton: Bool) -> String? {
| `- note: add '@MainActor' to make global function 'methodGen(_:method:className:cdef:usedMethods:kind:asSingleton:)' part of global actor 'MainActor'
89 | var registerVirtualMethodName: String? = nil
90 |
:
427 | optstorage = ""
428 | } else {
429 | if builtinSizes [arg.type] != nil && arg.type != "Object" {
| `- error: main actor-isolated var 'builtinSizes' can not be referenced from a nonisolated context
430 | optstorage = ".content"
431 | } else if arg.type.starts(with: "typedarray::") {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:89:5: note: var declared here
87 |
88 | let buildConfiguration: String = "float_64"
89 | var builtinSizes: [String: Int] = [:]
| `- note: var declared here
90 | for cs in jsonApi.builtinClassSizes {
91 | if cs.buildConfiguration == buildConfiguration {
[13/24] Compiling Generator Printer.swift
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/MethodGen.swift:180:42: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
86 | /// - usedMethods: a set of methods that have been referenced by properties, to determine whether we make this public or private
87 | /// - Returns: nil, or the method we surfaced that needs to have the virtual supporting infrastructured wired up
88 | func methodGen (_ p: Printer, method: MethodDefinition, className: String, cdef: JClassInfo?, usedMethods: Set<String>, kind: MethodGenType, asSingleton: Bool) -> String? {
| `- note: add '@MainActor' to make global function 'methodGen(_:method:className:cdef:usedMethods:kind:asSingleton:)' part of global actor 'MainActor'
89 | var registerVirtualMethodName: String? = nil
90 |
:
178 | }
179 | let godotReturnType = method.returnValue?.type
180 | let godotReturnTypeIsReferenceType = classMap [godotReturnType ?? ""] != nil
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
181 | let returnOptional = godotReturnTypeIsReferenceType && isReturnOptional(className: className, method: method.name)
182 | let returnType = getGodotType (method.returnValue) + (returnOptional ? "?" : "")
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/MethodGen.swift:241:27: error: main actor-isolated var 'builtinSizes' can not be referenced from a nonisolated context
223 | }
224 |
225 | func getResultPtr() -> String {
| `- note: add '@MainActor' to make local function 'getResultPtr()' part of global actor 'MainActor'
226 | let ptrResult: String
227 | if returnType != "" {
:
239 | } else if frameworkType {
240 | ptrResult = "&_result"
241 | } else if builtinSizes [godotReturnType] != nil {
| `- error: main actor-isolated var 'builtinSizes' can not be referenced from a nonisolated context
242 | ptrResult = "&_result.content"
243 | } else {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:89:5: note: var declared here
87 |
88 | let buildConfiguration: String = "float_64"
89 | var builtinSizes: [String: Int] = [:]
| `- note: var declared here
90 | for cs in jsonApi.builtinClassSizes {
91 | if cs.buildConfiguration == buildConfiguration {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/MethodGen.swift:340:16: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
86 | /// - usedMethods: a set of methods that have been referenced by properties, to determine whether we make this public or private
87 | /// - Returns: nil, or the method we surfaced that needs to have the virtual supporting infrastructured wired up
88 | func methodGen (_ p: Printer, method: MethodDefinition, className: String, cdef: JClassInfo?, usedMethods: Set<String>, kind: MethodGenType, asSingleton: Bool) -> String? {
| `- note: add '@MainActor' to make global function 'methodGen(_:method:className:cdef:usedMethods:kind:asSingleton:)' part of global actor 'MainActor'
89 | var registerVirtualMethodName: String? = nil
90 |
:
338 | if args != "" { args += ", " }
339 | var isRefOptional = false
340 | if classMap [arg.type] != nil {
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
341 | isRefOptional = isRefParameterOptional (className: className, method: method.name, arg: arg.name)
342 | }
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/MethodGen.swift:426:20: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
86 | /// - usedMethods: a set of methods that have been referenced by properties, to determine whether we make this public or private
87 | /// - Returns: nil, or the method we surfaced that needs to have the virtual supporting infrastructured wired up
88 | func methodGen (_ p: Printer, method: MethodDefinition, className: String, cdef: JClassInfo?, usedMethods: Set<String>, kind: MethodGenType, asSingleton: Bool) -> String? {
| `- note: add '@MainActor' to make global function 'methodGen(_:method:className:cdef:usedMethods:kind:asSingleton:)' part of global actor 'MainActor'
89 | var registerVirtualMethodName: String? = nil
90 |
:
424 | } else {
425 | argref = escapeSwift (snakeToCamel (arg.name))
426 | if isStructMap [arg.type] ?? false {
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
427 | optstorage = ""
428 | } else {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/MethodGen.swift:429:24: error: main actor-isolated var 'builtinSizes' can not be referenced from a nonisolated context
86 | /// - usedMethods: a set of methods that have been referenced by properties, to determine whether we make this public or private
87 | /// - Returns: nil, or the method we surfaced that needs to have the virtual supporting infrastructured wired up
88 | func methodGen (_ p: Printer, method: MethodDefinition, className: String, cdef: JClassInfo?, usedMethods: Set<String>, kind: MethodGenType, asSingleton: Bool) -> String? {
| `- note: add '@MainActor' to make global function 'methodGen(_:method:className:cdef:usedMethods:kind:asSingleton:)' part of global actor 'MainActor'
89 | var registerVirtualMethodName: String? = nil
90 |
:
427 | optstorage = ""
428 | } else {
429 | if builtinSizes [arg.type] != nil && arg.type != "Object" {
| `- error: main actor-isolated var 'builtinSizes' can not be referenced from a nonisolated context
430 | optstorage = ".content"
431 | } else if arg.type.starts(with: "typedarray::") {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:89:5: note: var declared here
87 |
88 | let buildConfiguration: String = "float_64"
89 | var builtinSizes: [String: Int] = [:]
| `- note: var declared here
90 | for cs in jsonApi.builtinClassSizes {
91 | if cs.buildConfiguration == buildConfiguration {
[14/24] Compiling Generator main.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[15/24] Emitting module Generator
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/MethodGen.swift:180:42: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
86 | /// - usedMethods: a set of methods that have been referenced by properties, to determine whether we make this public or private
87 | /// - Returns: nil, or the method we surfaced that needs to have the virtual supporting infrastructured wired up
88 | func methodGen (_ p: Printer, method: MethodDefinition, className: String, cdef: JClassInfo?, usedMethods: Set<String>, kind: MethodGenType, asSingleton: Bool) -> String? {
| `- note: add '@MainActor' to make global function 'methodGen(_:method:className:cdef:usedMethods:kind:asSingleton:)' part of global actor 'MainActor'
89 | var registerVirtualMethodName: String? = nil
90 |
:
178 | }
179 | let godotReturnType = method.returnValue?.type
180 | let godotReturnTypeIsReferenceType = classMap [godotReturnType ?? ""] != nil
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
181 | let returnOptional = godotReturnTypeIsReferenceType && isReturnOptional(className: className, method: method.name)
182 | let returnType = getGodotType (method.returnValue) + (returnOptional ? "?" : "")
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/MethodGen.swift:340:16: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
86 | /// - usedMethods: a set of methods that have been referenced by properties, to determine whether we make this public or private
87 | /// - Returns: nil, or the method we surfaced that needs to have the virtual supporting infrastructured wired up
88 | func methodGen (_ p: Printer, method: MethodDefinition, className: String, cdef: JClassInfo?, usedMethods: Set<String>, kind: MethodGenType, asSingleton: Bool) -> String? {
| `- note: add '@MainActor' to make global function 'methodGen(_:method:className:cdef:usedMethods:kind:asSingleton:)' part of global actor 'MainActor'
89 | var registerVirtualMethodName: String? = nil
90 |
:
338 | if args != "" { args += ", " }
339 | var isRefOptional = false
340 | if classMap [arg.type] != nil {
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
341 | isRefOptional = isRefParameterOptional (className: className, method: method.name, arg: arg.name)
342 | }
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/MethodGen.swift:426:20: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
86 | /// - usedMethods: a set of methods that have been referenced by properties, to determine whether we make this public or private
87 | /// - Returns: nil, or the method we surfaced that needs to have the virtual supporting infrastructured wired up
88 | func methodGen (_ p: Printer, method: MethodDefinition, className: String, cdef: JClassInfo?, usedMethods: Set<String>, kind: MethodGenType, asSingleton: Bool) -> String? {
| `- note: add '@MainActor' to make global function 'methodGen(_:method:className:cdef:usedMethods:kind:asSingleton:)' part of global actor 'MainActor'
89 | var registerVirtualMethodName: String? = nil
90 |
:
424 | } else {
425 | argref = escapeSwift (snakeToCamel (arg.name))
426 | if isStructMap [arg.type] ?? false {
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
427 | optstorage = ""
428 | } else {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/MethodGen.swift:429:24: error: main actor-isolated var 'builtinSizes' can not be referenced from a nonisolated context
86 | /// - usedMethods: a set of methods that have been referenced by properties, to determine whether we make this public or private
87 | /// - Returns: nil, or the method we surfaced that needs to have the virtual supporting infrastructured wired up
88 | func methodGen (_ p: Printer, method: MethodDefinition, className: String, cdef: JClassInfo?, usedMethods: Set<String>, kind: MethodGenType, asSingleton: Bool) -> String? {
| `- note: add '@MainActor' to make global function 'methodGen(_:method:className:cdef:usedMethods:kind:asSingleton:)' part of global actor 'MainActor'
89 | var registerVirtualMethodName: String? = nil
90 |
:
427 | optstorage = ""
428 | } else {
429 | if builtinSizes [arg.type] != nil && arg.type != "Object" {
| `- error: main actor-isolated var 'builtinSizes' can not be referenced from a nonisolated context
430 | optstorage = ".content"
431 | } else if arg.type.starts(with: "typedarray::") {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:89:5: note: var declared here
87 |
88 | let buildConfiguration: String = "float_64"
89 | var builtinSizes: [String: Int] = [:]
| `- note: var declared here
90 | for cs in jsonApi.builtinClassSizes {
91 | if cs.buildConfiguration == buildConfiguration {
[16/24] Compiling Generator Arguments.swift
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/Arguments.swift:68:98: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
66 | // - typedarrays, the default values need to be handled one by one, or a general conversion
67 | // system needs to be implemented
68 | if !argumentType.starts(with: "Array") && !argumentType.starts(with: "bitfield::") && (!(isStructMap [argumentType] ?? false) || isPrimitiveType(name: argumentType)) && argumentType != "NodePath" && !argumentType.starts(with: "typedarray::") && !argumentType.starts (with: "Dictionary") && dv != "null" {
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
69 | if argument.type == "String" {
70 | def = " = \(dv)"
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/Arguments.swift:188:10: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
182 | }
183 |
184 | func getArgRef (arg: JGodotArgument) -> String {
| `- note: add '@MainActor' to make global function 'getArgRef(arg:)' part of global actor 'MainActor'
185 | var argref: String
186 | var optstorage: String
187 | var needAddress = "&"
188 | if !(isStructMap [arg.type] ?? false) { // { ) isCoreType(name: arg.type){
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
189 | argref = godotArgumentToSwift (arg.name)
190 | if isStructMap [arg.type] ?? false {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/Arguments.swift:190:12: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
182 | }
183 |
184 | func getArgRef (arg: JGodotArgument) -> String {
| `- note: add '@MainActor' to make global function 'getArgRef(arg:)' part of global actor 'MainActor'
185 | var argref: String
186 | var optstorage: String
:
188 | if !(isStructMap [arg.type] ?? false) { // { ) isCoreType(name: arg.type){
189 | argref = godotArgumentToSwift (arg.name)
190 | if isStructMap [arg.type] ?? false {
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
191 | optstorage = ""
192 | } else if arg.type == "String" && mapStringToSwift {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/Arguments.swift:196:16: error: main actor-isolated var 'builtinSizes' can not be referenced from a nonisolated context
182 | }
183 |
184 | func getArgRef (arg: JGodotArgument) -> String {
| `- note: add '@MainActor' to make global function 'getArgRef(arg:)' part of global actor 'MainActor'
185 | var argref: String
186 | var optstorage: String
:
194 | optstorage = ".content"
195 | } else {
196 | if builtinSizes [arg.type] != nil && arg.type != "Object" {
| `- error: main actor-isolated var 'builtinSizes' can not be referenced from a nonisolated context
197 | optstorage = ".content"
198 | } else {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:89:5: note: var declared here
87 |
88 | let buildConfiguration: String = "float_64"
89 | var builtinSizes: [String: Int] = [:]
| `- note: var declared here
90 | for cs in jsonApi.builtinClassSizes {
91 | if cs.buildConfiguration == buildConfiguration {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/Arguments.swift:207:9: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
182 | }
183 |
184 | func getArgRef (arg: JGodotArgument) -> String {
| `- note: add '@MainActor' to make global function 'getArgRef(arg:)' part of global actor 'MainActor'
185 | var argref: String
186 | var optstorage: String
:
205 | optstorage = ""
206 | }
207 | if (isStructMap [arg.type] ?? false) {
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
208 | return "\(needAddress)\(escapeSwift(argref))\(optstorage)"
209 | } else {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/Arguments.swift:221:12: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
212 | }
213 |
214 | func generateCopies (_ args: [JGodotArgument]) -> String {
| `- note: add '@MainActor' to make global function 'generateCopies' part of global actor 'MainActor'
215 | var body = ""
216 |
:
219 | var reference = godotArgumentToSwift (arg.name)
220 |
221 | if isStructMap [arg.type] ?? false {
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
222 | if arg.type == "float" {
223 | reference = "Double (\(reference))"
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/BuiltinGen.swift:94:20: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
84 | }
85 |
86 | func generateBuiltinCtors (_ p: Printer,
| `- note: add '@MainActor' to make global function 'generateBuiltinCtors(_:_:_:godotTypeName:typeName:typeEnum:members:)' part of global actor 'MainActor'
87 | _ bc: JGodotBuiltinClass,
88 | _ ctors: [JGodotConstructor],
:
92 | members: [JGodotArgument]?)
93 | {
94 | let isStruct = isStructMap [typeName] ?? false
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
95 |
96 | for m in ctors {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/BuiltinGen.swift:237:24: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
202 | }
203 |
204 | func generateMethodCall (_ p: Printer,
| `- note: add '@MainActor' to make global function 'generateMethodCall(_:typeName:methodToCall:godotReturnType:isStatic:isVararg:arguments:kind:)' part of global actor 'MainActor'
205 | typeName: String,
206 | methodToCall: String,
:
235 | let ptrResult: String
236 | if has_return {
237 | let isStruct = isStructMap [godotReturnType ?? ""] ?? false
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
238 | if isStruct {
239 | ptrResult = "&result"
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/BuiltinGen.swift:261:12: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
202 | }
203 |
204 | func generateMethodCall (_ p: Printer,
| `- note: add '@MainActor' to make global function 'generateMethodCall(_:typeName:methodToCall:godotReturnType:isStatic:isVararg:arguments:kind:)' part of global actor 'MainActor'
205 | typeName: String,
206 | methodToCall: String,
:
259 | p ("\(typeName).\(methodToCall) (nil, \(ptrArgs), \(ptrResult)\(numberOfArgs))")
260 | } else {
261 | if isStructMap [typeName] ?? false {
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
262 | p ("withUnsafePointer (to: self) { ptr in ")
263 | p (" \(typeName).\(methodToCall) (UnsafeMutableRawPointer (mutating: ptr), \(ptrArgs), \(ptrResult)\(numberOfArgs))")
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/BuiltinGen.swift:338:32: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
336 | p ("\(declType) result: \(retType) = \(retType)()")
337 | }
338 | let isStruct = isStructMap [op.returnType] ?? false
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
339 | if isStruct {
340 | ptrResult = "&result"
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/BuiltinGen.swift:667:59: error: main actor-isolated var 'builtinMemberOffsets' can not be referenced from a nonisolated context
665 | storedMembers = bc.members
666 | } else {
667 | if kind == .isStruct, let memberOffsets = builtinMemberOffsets [bc.name] {
| `- error: main actor-isolated var 'builtinMemberOffsets' can not be referenced from a nonisolated context
668 | storedMembers = memberOffsets.compactMap({ m in
669 | return bc.members?.first(where: { $0.name == m.member })
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:97:5: note: var declared here
95 | }
96 | }
97 | var builtinMemberOffsets: [String: [JGodotMember]] = [:]
| `- note: var declared here
98 | for mo in jsonApi.builtinClassMemberOffsets {
99 | if mo.buildConfiguration == buildConfiguration {
[17/24] Compiling Generator BuiltinGen.swift
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/Arguments.swift:68:98: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
66 | // - typedarrays, the default values need to be handled one by one, or a general conversion
67 | // system needs to be implemented
68 | if !argumentType.starts(with: "Array") && !argumentType.starts(with: "bitfield::") && (!(isStructMap [argumentType] ?? false) || isPrimitiveType(name: argumentType)) && argumentType != "NodePath" && !argumentType.starts(with: "typedarray::") && !argumentType.starts (with: "Dictionary") && dv != "null" {
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
69 | if argument.type == "String" {
70 | def = " = \(dv)"
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/Arguments.swift:188:10: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
182 | }
183 |
184 | func getArgRef (arg: JGodotArgument) -> String {
| `- note: add '@MainActor' to make global function 'getArgRef(arg:)' part of global actor 'MainActor'
185 | var argref: String
186 | var optstorage: String
187 | var needAddress = "&"
188 | if !(isStructMap [arg.type] ?? false) { // { ) isCoreType(name: arg.type){
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
189 | argref = godotArgumentToSwift (arg.name)
190 | if isStructMap [arg.type] ?? false {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/Arguments.swift:190:12: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
182 | }
183 |
184 | func getArgRef (arg: JGodotArgument) -> String {
| `- note: add '@MainActor' to make global function 'getArgRef(arg:)' part of global actor 'MainActor'
185 | var argref: String
186 | var optstorage: String
:
188 | if !(isStructMap [arg.type] ?? false) { // { ) isCoreType(name: arg.type){
189 | argref = godotArgumentToSwift (arg.name)
190 | if isStructMap [arg.type] ?? false {
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
191 | optstorage = ""
192 | } else if arg.type == "String" && mapStringToSwift {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/Arguments.swift:196:16: error: main actor-isolated var 'builtinSizes' can not be referenced from a nonisolated context
182 | }
183 |
184 | func getArgRef (arg: JGodotArgument) -> String {
| `- note: add '@MainActor' to make global function 'getArgRef(arg:)' part of global actor 'MainActor'
185 | var argref: String
186 | var optstorage: String
:
194 | optstorage = ".content"
195 | } else {
196 | if builtinSizes [arg.type] != nil && arg.type != "Object" {
| `- error: main actor-isolated var 'builtinSizes' can not be referenced from a nonisolated context
197 | optstorage = ".content"
198 | } else {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:89:5: note: var declared here
87 |
88 | let buildConfiguration: String = "float_64"
89 | var builtinSizes: [String: Int] = [:]
| `- note: var declared here
90 | for cs in jsonApi.builtinClassSizes {
91 | if cs.buildConfiguration == buildConfiguration {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/Arguments.swift:207:9: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
182 | }
183 |
184 | func getArgRef (arg: JGodotArgument) -> String {
| `- note: add '@MainActor' to make global function 'getArgRef(arg:)' part of global actor 'MainActor'
185 | var argref: String
186 | var optstorage: String
:
205 | optstorage = ""
206 | }
207 | if (isStructMap [arg.type] ?? false) {
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
208 | return "\(needAddress)\(escapeSwift(argref))\(optstorage)"
209 | } else {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/Arguments.swift:221:12: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
212 | }
213 |
214 | func generateCopies (_ args: [JGodotArgument]) -> String {
| `- note: add '@MainActor' to make global function 'generateCopies' part of global actor 'MainActor'
215 | var body = ""
216 |
:
219 | var reference = godotArgumentToSwift (arg.name)
220 |
221 | if isStructMap [arg.type] ?? false {
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
222 | if arg.type == "float" {
223 | reference = "Double (\(reference))"
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/BuiltinGen.swift:94:20: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
84 | }
85 |
86 | func generateBuiltinCtors (_ p: Printer,
| `- note: add '@MainActor' to make global function 'generateBuiltinCtors(_:_:_:godotTypeName:typeName:typeEnum:members:)' part of global actor 'MainActor'
87 | _ bc: JGodotBuiltinClass,
88 | _ ctors: [JGodotConstructor],
:
92 | members: [JGodotArgument]?)
93 | {
94 | let isStruct = isStructMap [typeName] ?? false
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
95 |
96 | for m in ctors {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/BuiltinGen.swift:237:24: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
202 | }
203 |
204 | func generateMethodCall (_ p: Printer,
| `- note: add '@MainActor' to make global function 'generateMethodCall(_:typeName:methodToCall:godotReturnType:isStatic:isVararg:arguments:kind:)' part of global actor 'MainActor'
205 | typeName: String,
206 | methodToCall: String,
:
235 | let ptrResult: String
236 | if has_return {
237 | let isStruct = isStructMap [godotReturnType ?? ""] ?? false
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
238 | if isStruct {
239 | ptrResult = "&result"
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/BuiltinGen.swift:261:12: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
202 | }
203 |
204 | func generateMethodCall (_ p: Printer,
| `- note: add '@MainActor' to make global function 'generateMethodCall(_:typeName:methodToCall:godotReturnType:isStatic:isVararg:arguments:kind:)' part of global actor 'MainActor'
205 | typeName: String,
206 | methodToCall: String,
:
259 | p ("\(typeName).\(methodToCall) (nil, \(ptrArgs), \(ptrResult)\(numberOfArgs))")
260 | } else {
261 | if isStructMap [typeName] ?? false {
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
262 | p ("withUnsafePointer (to: self) { ptr in ")
263 | p (" \(typeName).\(methodToCall) (UnsafeMutableRawPointer (mutating: ptr), \(ptrArgs), \(ptrResult)\(numberOfArgs))")
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/BuiltinGen.swift:338:32: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
336 | p ("\(declType) result: \(retType) = \(retType)()")
337 | }
338 | let isStruct = isStructMap [op.returnType] ?? false
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
339 | if isStruct {
340 | ptrResult = "&result"
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/BuiltinGen.swift:667:59: error: main actor-isolated var 'builtinMemberOffsets' can not be referenced from a nonisolated context
665 | storedMembers = bc.members
666 | } else {
667 | if kind == .isStruct, let memberOffsets = builtinMemberOffsets [bc.name] {
| `- error: main actor-isolated var 'builtinMemberOffsets' can not be referenced from a nonisolated context
668 | storedMembers = memberOffsets.compactMap({ m in
669 | return bc.members?.first(where: { $0.name == m.member })
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:97:5: note: var declared here
95 | }
96 | }
97 | var builtinMemberOffsets: [String: [JGodotMember]] = [:]
| `- note: var declared here
98 | for mo in jsonApi.builtinClassMemberOffsets {
99 | if mo.buildConfiguration == buildConfiguration {
[18/24] Compiling Generator ClassGen.swift
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:37:12: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
18 | var typeToChildren: [String:[String]] = [:]
19 |
20 | func makeDefaultInit (godotType: String, initCollection: String = "") -> String {
| `- note: add '@MainActor' to make global function 'makeDefaultInit(godotType:initCollection:)' part of global actor 'MainActor'
21 | switch godotType {
22 | case "int":
:
35 | let nestedTypeName = String (t.dropFirst(12))
36 | let simple = SimpleType(type: nestedTypeName)
37 | if classMap [nestedTypeName] != nil {
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
38 | return "ObjectCollection<\(getGodotType (simple))>(\(initCollection))"
39 | } else {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:66:8: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
63 | }
64 |
65 | func argTypeNeedsCopy (godotType: String) -> Bool {
| `- note: add '@MainActor' to make global function 'argTypeNeedsCopy(godotType:)' part of global actor 'MainActor'
66 | if isStructMap [godotType] ?? false {
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
67 | return true
68 | }
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:91:46: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
76 | }
77 |
78 | func generateVirtualProxy (_ p: Printer,
| `- note: add '@MainActor' to make global function 'generateVirtualProxy(_:cdef:methodName:method:)' part of global actor 'MainActor'
79 | cdef: JGodotExtensionAPIClass,
80 | methodName: String,
:
89 | if let ret = method.returnValue {
90 | let godotReturnType = ret.type
91 | let godotReturnTypeIsReferenceType = classMap [godotReturnType] != nil
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
92 | returnOptional = godotReturnTypeIsReferenceType && isReturnOptional(className: cdef.name, method: methodName)
93 |
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:119:23: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
117 | if arg.type == "String" {
118 | argCall += "GString.stringFromGStringPtr (ptr: args [\(i)]!) ?? \"\""
119 | } else if classMap [arg.type] != nil {
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
120 | //
121 | // This idiom guarantees that: if this is a known object, we surface this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:126:20: error: main actor-isolated var 'hasSubclasses' can not be referenced from a nonisolated context
124 | argPrep += "let resolved_\(i) = args [\(i)]!.load (as: UnsafeRawPointer.self)\n"
125 | let handleResolver: String
126 | if hasSubclasses.contains(cdef.name) {
| `- error: main actor-isolated var 'hasSubclasses' can not be referenced from a nonisolated context
127 | // If the type we are bubbling up has subclasses, we want to create the most
128 | // derived type if possible, so we perform the longer lookup
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:68:5: note: var declared here
66 | // for handle -> Swift type using `lookupObject` rather than creating
67 | // a plain wrapper directly from the handle
68 | var hasSubclasses = Set<String> ()
| `- note: var declared here
69 |
70 | for x in jsonApi.classes {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:157:16: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
155 | }
156 | if let ret = method.returnValue {
157 | if isStructMap [ret.type] ?? false || isStructMap [virtRet ?? "NON_EXIDTENT"] ?? false || ret.type.starts(with: "bitfield::"){
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
158 | p ("retPtr!.storeBytes (of: ret, as: \(virtRet!).self)")
159 | } else if ret.type.starts(with: "enum::") {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:157:51: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
155 | }
156 | if let ret = method.returnValue {
157 | if isStructMap [ret.type] ?? false || isStructMap [virtRet ?? "NON_EXIDTENT"] ?? false || ret.type.starts(with: "bitfield::"){
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
158 | p ("retPtr!.storeBytes (of: ret, as: \(virtRet!).self)")
159 | } else if ret.type.starts(with: "enum::") {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:169:27: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
167 | derefField = "array.content"
168 | derefType = "type (of: ret.array.content)"
169 | } else if classMap [ret.type] != nil {
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
170 | derefField = "handle"
171 | derefType = "UnsafeRawPointer?.self"
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:181:30: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
179 | target = "array.content"
180 | } else {
181 | target = classMap [ret.type] != nil ? "handle" : "content"
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
182 | }
183 | p ("retPtr!.storeBytes (of: ret\(returnOptional ? "?" : "").\(derefField), as: \(derefType)) // \(ret.type)")
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:321:20: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
310 | p ("\n/* Properties */\n")
311 |
312 | func findMethod (forProperty: JGodotProperty, startAt: JGodotExtensionAPIClass, name: String, resolvedName: inout String, argName: inout String) -> JGodotClassMethod? {
| `- note: add '@MainActor' to make local function 'findMethod(forProperty:startAt:name:resolvedName:argName:)' part of global actor 'MainActor'
313 | if let here = methods.first(where: { $0.name == name}) {
314 | return here
:
319 | return nil
320 | }
321 | cdef = classMap [parentName]
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
322 | guard let cdef else {
323 | print ("Warning: Missing type \(parentName)")
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:403:46: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
301 | }
302 | }
303 | func generateProperties (_ p: Printer,
| `- note: add '@MainActor' to make global function 'generateProperties(_:cdef:_:_:_:asSingleton:)' part of global actor 'MainActor'
304 | cdef: JGodotExtensionAPIClass,
305 | _ properties: [JGodotProperty],
:
401 | }
402 | let godotReturnType = method.returnValue?.type
403 | let godotReturnTypeIsReferenceType = classMap [godotReturnType ?? ""] != nil
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
404 |
405 | let propertyOptional = godotReturnTypeIsReferenceType && isReturnOptional(className: cdef.name, method: property.getter)
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:530:24: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
528 | let construct: String
529 |
530 | if let _ = classMap [arg.type] {
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
531 | argUnwrap += "var ptr_\(argIdx): UnsafeMutableRawPointer?\n"
532 | argUnwrap += "args [\(argIdx)].toType (Variant.GType.object, dest: &ptr_\(argIdx))\n"
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:678:24: error: main actor-isolated var 'hasSubclasses' can not be referenced from a nonisolated context
676 | p.staticVar(visibility: "public ", name: "shared", type: cdef.name) {
677 | p ("return withUnsafePointer (to: &\(cdef.name).godotClassName.content)", arg: " ptr in") {
678 | if hasSubclasses.contains(cdef.name) {
| `- error: main actor-isolated var 'hasSubclasses' can not be referenced from a nonisolated context
679 | p ("lookupObject (nativeHandle: gi.global_get_singleton (ptr)!)!")
680 | } else {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:68:5: note: var declared here
66 | // for handle -> Swift type using `lookupObject` rather than creating
67 | // a plain wrapper directly from the handle
68 | var hasSubclasses = Set<String> ()
| `- note: var declared here
69 |
70 | for x in jsonApi.classes {
[19/24] Compiling Generator Data.swift
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:37:12: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
18 | var typeToChildren: [String:[String]] = [:]
19 |
20 | func makeDefaultInit (godotType: String, initCollection: String = "") -> String {
| `- note: add '@MainActor' to make global function 'makeDefaultInit(godotType:initCollection:)' part of global actor 'MainActor'
21 | switch godotType {
22 | case "int":
:
35 | let nestedTypeName = String (t.dropFirst(12))
36 | let simple = SimpleType(type: nestedTypeName)
37 | if classMap [nestedTypeName] != nil {
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
38 | return "ObjectCollection<\(getGodotType (simple))>(\(initCollection))"
39 | } else {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:66:8: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
63 | }
64 |
65 | func argTypeNeedsCopy (godotType: String) -> Bool {
| `- note: add '@MainActor' to make global function 'argTypeNeedsCopy(godotType:)' part of global actor 'MainActor'
66 | if isStructMap [godotType] ?? false {
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
67 | return true
68 | }
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:91:46: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
76 | }
77 |
78 | func generateVirtualProxy (_ p: Printer,
| `- note: add '@MainActor' to make global function 'generateVirtualProxy(_:cdef:methodName:method:)' part of global actor 'MainActor'
79 | cdef: JGodotExtensionAPIClass,
80 | methodName: String,
:
89 | if let ret = method.returnValue {
90 | let godotReturnType = ret.type
91 | let godotReturnTypeIsReferenceType = classMap [godotReturnType] != nil
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
92 | returnOptional = godotReturnTypeIsReferenceType && isReturnOptional(className: cdef.name, method: methodName)
93 |
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:119:23: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
117 | if arg.type == "String" {
118 | argCall += "GString.stringFromGStringPtr (ptr: args [\(i)]!) ?? \"\""
119 | } else if classMap [arg.type] != nil {
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
120 | //
121 | // This idiom guarantees that: if this is a known object, we surface this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:126:20: error: main actor-isolated var 'hasSubclasses' can not be referenced from a nonisolated context
124 | argPrep += "let resolved_\(i) = args [\(i)]!.load (as: UnsafeRawPointer.self)\n"
125 | let handleResolver: String
126 | if hasSubclasses.contains(cdef.name) {
| `- error: main actor-isolated var 'hasSubclasses' can not be referenced from a nonisolated context
127 | // If the type we are bubbling up has subclasses, we want to create the most
128 | // derived type if possible, so we perform the longer lookup
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:68:5: note: var declared here
66 | // for handle -> Swift type using `lookupObject` rather than creating
67 | // a plain wrapper directly from the handle
68 | var hasSubclasses = Set<String> ()
| `- note: var declared here
69 |
70 | for x in jsonApi.classes {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:157:16: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
155 | }
156 | if let ret = method.returnValue {
157 | if isStructMap [ret.type] ?? false || isStructMap [virtRet ?? "NON_EXIDTENT"] ?? false || ret.type.starts(with: "bitfield::"){
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
158 | p ("retPtr!.storeBytes (of: ret, as: \(virtRet!).self)")
159 | } else if ret.type.starts(with: "enum::") {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:157:51: error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
155 | }
156 | if let ret = method.returnValue {
157 | if isStructMap [ret.type] ?? false || isStructMap [virtRet ?? "NON_EXIDTENT"] ?? false || ret.type.starts(with: "bitfield::"){
| `- error: main actor-isolated var 'isStructMap' can not be referenced from a nonisolated context
158 | p ("retPtr!.storeBytes (of: ret, as: \(virtRet!).self)")
159 | } else if ret.type.starts(with: "enum::") {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:35:5: note: var declared here
33 | // Determines whether a built-in type is defined as a structure, this means:
34 | // that it has fields and does not have a "handle" pointer to the native object
35 | var isStructMap: [String:Bool] = [:]
| `- note: var declared here
36 |
37 | func dropMatchingPrefix (_ enumName: String, _ enumKey: String) -> String {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:169:27: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
167 | derefField = "array.content"
168 | derefType = "type (of: ret.array.content)"
169 | } else if classMap [ret.type] != nil {
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
170 | derefField = "handle"
171 | derefType = "UnsafeRawPointer?.self"
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:181:30: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
179 | target = "array.content"
180 | } else {
181 | target = classMap [ret.type] != nil ? "handle" : "content"
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
182 | }
183 | p ("retPtr!.storeBytes (of: ret\(returnOptional ? "?" : "").\(derefField), as: \(derefType)) // \(ret.type)")
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:321:20: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
310 | p ("\n/* Properties */\n")
311 |
312 | func findMethod (forProperty: JGodotProperty, startAt: JGodotExtensionAPIClass, name: String, resolvedName: inout String, argName: inout String) -> JGodotClassMethod? {
| `- note: add '@MainActor' to make local function 'findMethod(forProperty:startAt:name:resolvedName:argName:)' part of global actor 'MainActor'
313 | if let here = methods.first(where: { $0.name == name}) {
314 | return here
:
319 | return nil
320 | }
321 | cdef = classMap [parentName]
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
322 | guard let cdef else {
323 | print ("Warning: Missing type \(parentName)")
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:403:46: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
301 | }
302 | }
303 | func generateProperties (_ p: Printer,
| `- note: add '@MainActor' to make global function 'generateProperties(_:cdef:_:_:_:asSingleton:)' part of global actor 'MainActor'
304 | cdef: JGodotExtensionAPIClass,
305 | _ properties: [JGodotProperty],
:
401 | }
402 | let godotReturnType = method.returnValue?.type
403 | let godotReturnTypeIsReferenceType = classMap [godotReturnType ?? ""] != nil
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
404 |
405 | let propertyOptional = godotReturnTypeIsReferenceType && isReturnOptional(className: cdef.name, method: property.getter)
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:530:24: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
528 | let construct: String
529 |
530 | if let _ = classMap [arg.type] {
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
531 | argUnwrap += "var ptr_\(argIdx): UnsafeMutableRawPointer?\n"
532 | argUnwrap += "args [\(argIdx)].toType (Variant.GType.object, dest: &ptr_\(argIdx))\n"
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/ClassGen.swift:678:24: error: main actor-isolated var 'hasSubclasses' can not be referenced from a nonisolated context
676 | p.staticVar(visibility: "public ", name: "shared", type: cdef.name) {
677 | p ("return withUnsafePointer (to: &\(cdef.name).godotClassName.content)", arg: " ptr in") {
678 | if hasSubclasses.contains(cdef.name) {
| `- error: main actor-isolated var 'hasSubclasses' can not be referenced from a nonisolated context
679 | p ("lookupObject (nativeHandle: gi.global_get_singleton (ptr)!)!")
680 | } else {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:68:5: note: var declared here
66 | // for handle -> Swift type using `lookupObject` rather than creating
67 | // a plain wrapper directly from the handle
68 | var hasSubclasses = Set<String> ()
| `- note: var declared here
69 |
70 | for x in jsonApi.classes {
[20/24] Compiling Generator DocModel.swift
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/DocModel.swift:96:35: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
46 | // }
47 |
48 | func lookupConstant (_ txt: String.SubSequence) -> String {
| `- note: add '@MainActor' to make local function 'lookupConstant' part of global actor 'MainActor'
49 | func lookInDef (def: JClassInfo, match: String, local: Bool) -> String? {
50 | // TODO: for builtins, we wont have a cdef
:
94 | }
95 | let (type, name) = splitAtLastDot(str: txt)
96 | if type != "", let ldef = classMap [type] {
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
97 | if let r = lookInDef(def: ldef, match: name, local: false) {
98 | return "``\(getGodotType(SimpleType (type: type)) + "/" + r)``"
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/DocModel.swift:153:24: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
131 | }
132 |
133 | func convertMethod (_ txt: String.SubSequence) -> String {
| `- note: add '@MainActor' to make local function 'convertMethod' part of global actor 'MainActor'
134 | if txt.starts(with: "@") {
135 | // TODO, examples:
:
151 | var args = ""
152 | if let type {
153 | if let m = classMap [type] {
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
154 | if let method = findMethod (name: member, on: m) {
155 | args = assembleArgs (method, method.arguments)
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/DocModel.swift:157:31: error: main actor-isolated var 'builtinMap' can not be referenced from a nonisolated context
131 | }
132 |
133 | func convertMethod (_ txt: String.SubSequence) -> String {
| `- note: add '@MainActor' to make local function 'convertMethod' part of global actor 'MainActor'
134 | if txt.starts(with: "@") {
135 | // TODO, examples:
:
155 | args = assembleArgs (method, method.arguments)
156 | }
157 | } else if let m = builtinMap [type] {
| `- error: main actor-isolated var 'builtinMap' can not be referenced from a nonisolated context
158 | if let method = findMethod (name: member, on: m) {
159 | args = assembleArgs(nil, method.arguments)
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:77:5: note: var declared here
75 | }
76 |
77 | var builtinMap: [String: JGodotBuiltinClass] = [:]
| `- note: var declared here
78 |
79 | for x in jsonApi.builtinClasses {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/Enums.swift:23:22: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
10 |
11 | // The name of the form 'bitfield::'
12 | func findEnumDef (name: String) -> JGodotGlobalEnumElement? {
| `- note: add '@MainActor' to make global function 'findEnumDef(name:)' part of global actor 'MainActor'
13 | guard name.starts(with: "bitfield::") else {
14 | return nil
:
21 | }
22 | let type = full [full.startIndex..<split]
23 | guard let cdef = classMap [String (type)] else {
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
24 | print ("Could not find class \(type) for \(name)")
25 | return nil
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/Enums.swift:139:13: error: main actor-isolated var 'globalEnums' can not be mutated from a nonisolated context
38 | }
39 |
40 | func generateEnums (_ p: Printer, cdef: JClassInfo?, values: [JGodotGlobalEnumElement], prefix: String?) {
| `- note: add '@MainActor' to make global function 'generateEnums(_:cdef:values:prefix:)' part of global actor 'MainActor'
41 | for enumDef in values {
42 | let isBitField = enumDef.isBitfield ?? false
:
137 | }
138 | if let prefix {
139 | globalEnums [prefix + enumDef.name] = enumDef
| `- error: main actor-isolated var 'globalEnums' can not be mutated from a nonisolated context
140 | }
141 | }
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:57:5: note: mutation of this var is only permitted within the actor
55 | }
56 |
57 | var globalEnums: [String: JGodotGlobalEnumElement] = [:]
| `- note: mutation of this var is only permitted within the actor
58 |
59 | print ("Running with projectDir=$(projectDir) and output=\(outputDir)")
[21/24] Compiling Generator Enums.swift
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/DocModel.swift:96:35: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
46 | // }
47 |
48 | func lookupConstant (_ txt: String.SubSequence) -> String {
| `- note: add '@MainActor' to make local function 'lookupConstant' part of global actor 'MainActor'
49 | func lookInDef (def: JClassInfo, match: String, local: Bool) -> String? {
50 | // TODO: for builtins, we wont have a cdef
:
94 | }
95 | let (type, name) = splitAtLastDot(str: txt)
96 | if type != "", let ldef = classMap [type] {
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
97 | if let r = lookInDef(def: ldef, match: name, local: false) {
98 | return "``\(getGodotType(SimpleType (type: type)) + "/" + r)``"
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/DocModel.swift:153:24: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
131 | }
132 |
133 | func convertMethod (_ txt: String.SubSequence) -> String {
| `- note: add '@MainActor' to make local function 'convertMethod' part of global actor 'MainActor'
134 | if txt.starts(with: "@") {
135 | // TODO, examples:
:
151 | var args = ""
152 | if let type {
153 | if let m = classMap [type] {
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
154 | if let method = findMethod (name: member, on: m) {
155 | args = assembleArgs (method, method.arguments)
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/DocModel.swift:157:31: error: main actor-isolated var 'builtinMap' can not be referenced from a nonisolated context
131 | }
132 |
133 | func convertMethod (_ txt: String.SubSequence) -> String {
| `- note: add '@MainActor' to make local function 'convertMethod' part of global actor 'MainActor'
134 | if txt.starts(with: "@") {
135 | // TODO, examples:
:
155 | args = assembleArgs (method, method.arguments)
156 | }
157 | } else if let m = builtinMap [type] {
| `- error: main actor-isolated var 'builtinMap' can not be referenced from a nonisolated context
158 | if let method = findMethod (name: member, on: m) {
159 | args = assembleArgs(nil, method.arguments)
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:77:5: note: var declared here
75 | }
76 |
77 | var builtinMap: [String: JGodotBuiltinClass] = [:]
| `- note: var declared here
78 |
79 | for x in jsonApi.builtinClasses {
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/Enums.swift:23:22: error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
10 |
11 | // The name of the form 'bitfield::'
12 | func findEnumDef (name: String) -> JGodotGlobalEnumElement? {
| `- note: add '@MainActor' to make global function 'findEnumDef(name:)' part of global actor 'MainActor'
13 | guard name.starts(with: "bitfield::") else {
14 | return nil
:
21 | }
22 | let type = full [full.startIndex..<split]
23 | guard let cdef = classMap [String (type)] else {
| `- error: main actor-isolated var 'classMap' can not be referenced from a nonisolated context
24 | print ("Could not find class \(type) for \(name)")
25 | return nil
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:62:5: note: var declared here
60 |
61 | // Maps from a the class name to its definition
62 | var classMap: [String:JGodotExtensionAPIClass] = [:]
| `- note: var declared here
63 |
64 | // Tracks whether a Godot type has subclasses, we want to use this
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/Enums.swift:139:13: error: main actor-isolated var 'globalEnums' can not be mutated from a nonisolated context
38 | }
39 |
40 | func generateEnums (_ p: Printer, cdef: JClassInfo?, values: [JGodotGlobalEnumElement], prefix: String?) {
| `- note: add '@MainActor' to make global function 'generateEnums(_:cdef:values:prefix:)' part of global actor 'MainActor'
41 | for enumDef in values {
42 | let isBitField = enumDef.isBitfield ?? false
:
137 | }
138 | if let prefix {
139 | globalEnums [prefix + enumDef.name] = enumDef
| `- error: main actor-isolated var 'globalEnums' can not be mutated from a nonisolated context
140 | }
141 | }
/host/spi-builder-workspace/.build/checkouts/SwiftGodot/Generator/Generator/main.swift:57:5: note: mutation of this var is only permitted within the actor
55 | }
56 |
57 | var globalEnums: [String: JGodotGlobalEnumElement] = [:]
| `- note: mutation of this var is only permitted within the actor
58 |
59 | print ("Running with projectDir=$(projectDir) and output=\(outputDir)")
BUILD FAILURE 6.0 linux