Open Airyzz opened 6 months ago
Here is a failing build action for extra detail: https://github.com/Airyzz/SwiftGodotCrossBuild/actions/runs/7163879300/job/19503008702
Based on my testing here This seems to have been introduced by https://github.com/migueldeicaza/SwiftGodot/commit/c24f8b2124e5d83456e77d2bd2cd2a196dedbbe2
I'm hesitant to try and tackle this one myself, as I'm not sure I completely understand what is going on here, but my understanding is something related to withArgPointers
is causing issues on windows. It seems if on windows we just use withUnsafePointer
it will work ok
cc @pcbeard @migueldeicaza
This snippet is enough to break compilation on Windows:
func withArgPointers(_ args: UnsafeMutableRawPointer?...) {
print(args)
}
func call() {
var int: Int = 1
withArgPointers(&int)
}
Maybe going away from the variadic version to withArgPointers
overloads alternative from #272 is the way to go, as it seems to work on Windows.
How can I test for Windows at runtime?
In that case, I can fallback to the old code (which is still present, and used for vararg invocations)
Band aid applied, I suspect that we should report this to Apple.
This looks like a similar error. Is it related?
C:\Users\Simon\scoop\apps\swift\current\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\swift-frontend.exe -frontend -c C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Core\ClassServices.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Core\ContentTypeStorage.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Core\GArray.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Core\GArrayCollection.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Core\InspectableProperty.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Core\NIOLock.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Core\ObjectCollection.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Core\Packed.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Core\SignalRegistration.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Core\SignalSupport.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Core\StringExtensions.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Core\VariantCollection.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Core\VariantRepresentable.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Core\VariantStorable.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Core\Various.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Core\Wrapped.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\EntryPoint.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Export.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Extensions\Arithmetic.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Extensions\ClassInfo+ConvenienceProperties.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Extensions\ColorExtensions.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Extensions\GD+Utils.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Extensions\GDictionary.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Extensions\InputEvents.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Extensions\NodeExtensions.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Extensions\PhysicsDirectSpaceState3D+IntersectRayResult.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\GodotInterface.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\MacroDefs.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Native\LinearInterpolation.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Native\RotationConversion.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Native\Snapped.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\SwiftGodot.swift -primary-file C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\SwiftGodot\Variant.swift C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\plugins\outputs\swiftgodot\SwiftGodot\CodeGeneratorPlugin\GeneratedSources\generated.swift -emit-dependencies-path C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\x86_64-unknown-windows-msvc\debug\SwiftGodot.build\Variant.d -emit-reference-dependencies-path C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\x86_64-unknown-windows-msvc\debug\SwiftGodot.build\Variant.swiftdeps -target x86_64-unknown-windows-msvc -disable-objc-interop -sdk C:\Users\Simon\scoop\apps\swift\current\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk -I C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\x86_64-unknown-windows-msvc\debug -I C:\Users\Simon\scoop\apps\swift\current\Developer\Platforms\Windows.platform\Developer\Library\XCTest-development\usr\lib\swift\windows -I C:\Users\Simon\scoop\apps\swift\current\Developer\Platforms\Windows.platform\Developer\Library\XCTest-development\usr\lib\swift\windows\x86_64 -color-diagnostics -enable-testing -g -module-cache-path C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\x86_64-unknown-windows-msvc\debug\ModuleCache -suppress-warnings -swift-version 5 -Onone -D SWIFT_PACKAGE -D DEBUG -load-plugin-executable C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\x86_64-unknown-windows-msvc\debug\SwiftGodotMacroLibrary.exe#SwiftGodotMacroLibrary -empty-abi-descriptor -resource-dir C:\Users\Simon\scoop\apps\swift\current\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\lib\swift -enable-anonymous-context-mangled-names -Xcc -fmodule-map-file=C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\x86_64-unknown-windows-msvc\debug\GDExtension.build\module.modulemap -Xcc -I -Xcc C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\checkouts\SwiftGodot\Sources\GDExtension\include -Xcc -D_MT -Xcc -D_DLL -Xcc -Xclang -Xcc --dependent-lib=msvcrt -module-name SwiftGodot -package-name swiftgodot -plugin-path C:\Users\Simon\scoop\apps\swift\current\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin -plugin-path C:\Users\Simon\scoop\apps\swift\current\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\local\bin -parse-as-library -o C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\x86_64-unknown-windows-msvc\debug\SwiftGodot.build\Variant.swift.o -index-store-path C:\Users\Simon\Projects\dwl\MiniMedieval\swift\.build\x86_64-unknown-windows-msvc\debug\index\store -index-system-modules
error: compile command failed due to exception 3 (use -v to see invocation)
error: failed parsing the Swift compiler output: unexpected JSON message: {
"exception" : 3,
"kind" : "abnormal-exit",
"name" : "compile",
"output" : "\u001b[1m<unknown>:0: \u001b[0m\u001b[0;1;31merror: \u001b[0m\u001b[1merror opening 'C:\\Users\\Users\\Simon\\Projects\\dwl\\MiniMedieval\\swift\\.build\\plugins\\outputs\\swiftgodot\\SwiftGodot\\CodeGeneratorPlugin\\GeneratedSources\\generated.swiftdeps' for output: no such file or directory\r\n\u001b[0mAssertion failed: loadedGraph.has_value() && \"Should be able to read the exported graph.\", file C:\\Users\\swift-ci\\jenkins\\workspace\\oss-swift-windows-toolchain\\swift\\lib\\AST\\FineGrainedDependencies.cpp, line 237\r\nPlease submit a bug report (https:\/\/swift.org\/contributing\/#reporting-bugs) and include the crash backtrace.\r\nStack dump:\r\n0.\tProgram arguments: C:\/Users\/Simon\/scoop\/apps\/swift\/current\/Developer\/Toolchains\/unknown-Asserts-development.xctoolchain\/usr\/bin\/swift-frontend.exe -frontend -c C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Core\\\\ClassServices.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Core\\\\ContentTypeStorage.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Core\\\\GArray.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Core\\\\GArrayCollection.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Core\\\\InspectableProperty.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Core\\\\NIOLock.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Core\\\\ObjectCollection.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Core\\\\Packed.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Core\\\\SignalRegistration.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Core\\\\SignalSupport.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Core\\\\StringExtensions.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Core\\\\VariantCollection.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Core\\\\VariantRepresentable.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Core\\\\VariantStorable.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Core\\\\Various.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Core\\\\Wrapped.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\EntryPoint.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Export.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Extensions\\\\Arithmetic.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Extensions\\\\ClassInfo+ConvenienceProperties.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Extensions\\\\ColorExtensions.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Extensions\\\\GD+Utils.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Extensions\\\\GDictionary.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Extensions\\\\InputEvents.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Extensions\\\\NodeExtensions.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Extensions\\\\PhysicsDirectSpaceState3D+IntersectRayResult.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\GodotInterface.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\MacroDefs.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Native\\\\LinearInterpolation.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Native\\\\RotationConversion.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Native\\\\Snapped.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\SwiftGodot.swift C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\SwiftGodot\\\\Variant.swift -primary-file C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\plugins\\\\outputs\\\\swiftgodot\\\\SwiftGodot\\\\CodeGeneratorPlugin\\\\GeneratedSources\\\\generated.swift -emit-dependencies-path C:\\\\Users\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\plugins\\\\outputs\\\\swiftgodot\\\\SwiftGodot\\\\CodeGeneratorPlugin\\\\GeneratedSources\\\\generated.d -emit-reference-dependencies-path C:\\\\Users\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\plugins\\\\outputs\\\\swiftgodot\\\\SwiftGodot\\\\CodeGeneratorPlugin\\\\GeneratedSources\\\\generated.swiftdeps -target x86_64-unknown-windows-msvc -disable-objc-interop -sdk C:\\\\Users\\\\Simon\\\\scoop\\\\apps\\\\swift\\\\current\\\\Developer\\\\Platforms\\\\Windows.platform\\\\Developer\\\\SDKs\\\\Windows.sdk -I C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\x86_64-unknown-windows-msvc\\\\debug -I C:\\\\Users\\\\Simon\\\\scoop\\\\apps\\\\swift\\\\current\\\\Developer\\\\Platforms\\\\Windows.platform\\\\Developer\\\\Library\\\\XCTest-development\\\\usr\\\\lib\\\\swift\\\\windows -I C:\\\\Users\\\\Simon\\\\scoop\\\\apps\\\\swift\\\\current\\\\Developer\\\\Platforms\\\\Windows.platform\\\\Developer\\\\Library\\\\XCTest-development\\\\usr\\\\lib\\\\swift\\\\windows\\\\x86_64 -color-diagnostics -enable-testing -g -module-cache-path C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\x86_64-unknown-windows-msvc\\\\debug\\\\ModuleCache -suppress-warnings -swift-version 5 -Onone -D SWIFT_PACKAGE -D DEBUG -load-plugin-executable C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\x86_64-unknown-windows-msvc\\\\debug\\\\SwiftGodotMacroLibrary.exe#SwiftGodotMacroLibrary -empty-abi-descriptor -resource-dir C:\\\\Users\\\\Simon\\\\scoop\\\\apps\\\\swift\\\\current\\\\Developer\\\\Toolchains\\\\unknown-Asserts-development.xctoolchain\\\\usr\\\\lib\\\\swift -enable-anonymous-context-mangled-names -Xcc -fmodule-map-file=C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\x86_64-unknown-windows-msvc\\\\debug\\\\GDExtension.build\\\\module.modulemap -Xcc -I -Xcc C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\checkouts\\\\SwiftGodot\\\\Sources\\\\GDExtension\\\\include -Xcc -D_MT -Xcc -D_DLL -Xcc -Xclang -Xcc --dependent-lib=msvcrt -module-name SwiftGodot -package-name swiftgodot -plugin-path C:\\\\Users\\\\Simon\\\\scoop\\\\apps\\\\swift\\\\current\\\\Developer\\\\Toolchains\\\\unknown-Asserts-development.xctoolchain\\\\usr\\\\bin -plugin-path C:\\\\Users\\\\Simon\\\\scoop\\\\apps\\\\swift\\\\current\\\\Developer\\\\Toolchains\\\\unknown-Asserts-development.xctoolchain\\\\usr\\\\local\\\\bin -parse-as-library -o C:\\\\Users\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\plugins\\\\outputs\\\\swiftgodot\\\\SwiftGodot\\\\CodeGeneratorPlugin\\\\GeneratedSources\\\\generated.swift.o -index-store-path C:\\\\Users\\\\Simon\\\\Projects\\\\dwl\\\\MiniMedieval\\\\swift\\\\.build\\\\x86_64-unknown-windows-msvc\\\\debug\\\\index\\\\store -index-system-modules\r\n1.\tSwift version 5.9.2 (swift-5.9.2-RELEASE)\r\n2.\tCompiling with the current language version\r\nException Code: 0x80000003\r\n #0 0x00007ff7369a4395 (C:\\Users\\Simon\\scoop\\apps\\swift\\current\\Developer\\Toolchains\\unknown-Asserts-development.xctoolchain\\usr\\bin\\swift-frontend.exe+0x56e4395)\r\n #1 0x00007ffd8ce8e5f5 (C:\\WINDOWS\\System32\\ucrtbase.dll+0x7e5f5)\r\n #2 0x00007ffd8ce8f601 (C:\\WINDOWS\\System32\\ucrtbase.dll+0x7f601)\r\n #3 0x00007ffd8ce90fae (C:\\WINDOWS\\System32\\ucrtbase.dll+0x80fae)\r\n #4 0x00007ffd8ce911f1 (C:\\WINDOWS\\System32\\ucrtbase.dll+0x811f1)\r\n #5 0x00007ff732bce4ba (C:\\Users\\Simon\\scoop\\apps\\swift\\current\\Developer\\Toolchains\\unknown-Asserts-development.xctoolchain\\usr\\bin\\swift-frontend.exe+0x190e4ba)\r\n #6 0x00007ff7313bb5d3 (C:\\Users\\Simon\\scoop\\apps\\swift\\current\\Developer\\Toolchains\\unknown-Asserts-development.xctoolchain\\usr\\bin\\swift-frontend.exe+0xfb5d3)\r\n #7 0x00007ff732bca91f (C:\\Users\\Simon\\scoop\\apps\\swift\\current\\Developer\\Toolchains\\unknown-Asserts-development.xctoolchain\\usr\\bin\\swift-frontend.exe+0x190a91f)\r\n #8 0x00007ff7313c4dda (C:\\Users\\Simon\\scoop\\apps\\swift\\current\\Developer\\Toolchains\\unknown-Asserts-development.xctoolchain\\usr\\bin\\swift-frontend.exe+0x104dda)\r\n #9 0x00007ff7313c87cc (C:\\Users\\Simon\\scoop\\apps\\swift\\current\\Developer\\Toolchains\\unknown-Asserts-development.xctoolchain\\usr\\bin\\swift-frontend.exe+0x1087cc)\r\n#10 0x00007ff7313c76af (C:\\Users\\Simon\\scoop\\apps\\swift\\current\\Developer\\Toolchains\\unknown-Asserts-development.xctoolchain\\usr\\bin\\swift-frontend.exe+0x1076af)\r\n#11 0x00007ff7313c7f29 (C:\\Users\\Simon\\scoop\\apps\\swift\\current\\Developer\\Toolchains\\unknown-Asserts-development.xctoolchain\\usr\\bin\\swift-frontend.exe+0x107f29)\r\n#12 0x00007ff7313c6c74 (C:\\Users\\Simon\\scoop\\apps\\swift\\current\\Developer\\Toolchains\\unknown-Asserts-development.xctoolchain\\usr\\bin\\swift-frontend.exe+0x106c74)\r\n#13 0x00007ff7313c916f (C:\\Users\\Simon\\scoop\\apps\\swift\\current\\Developer\\Toolchains\\unknown-Asserts-development.xctoolchain\\usr\\bin\\swift-frontend.exe+0x10916f)\r\n#14 0x00007ff7313864fc (C:\\Users\\Simon\\scoop\\apps\\swift\\current\\Developer\\Toolchains\\unknown-Asserts-development.xctoolchain\\usr\\bin\\swift-frontend.exe+0xc64fc)\r\n#15 0x00007ff731386169 (C:\\Users\\Simon\\scoop\\apps\\swift\\current\\Developer\\Toolchains\\unknown-Asserts-development.xctoolchain\\usr\\bin\\swift-frontend.exe+0xc6169)\r\n#16 0x00007ff736a35d64 (C:\\Users\\Simon\\scoop\\apps\\swift\\current\\Developer\\Toolchains\\unknown-Asserts-development.xctoolchain\\usr\\bin\\swift-frontend.exe+0x5775d64)\r\n#17 0x00007ffd8dbd257d (C:\\WINDOWS\\System32\\KERNEL32.DLL+0x1257d)\r\n#18 0x00007ffd8f90aa58 (C:\\WINDOWS\\SYSTEM32\\ntdll.dll+0x5aa58)\r\n",
"pid" : 18004,
"process" : {
"real_pid" : 18004
}
}: dataCorrupted(Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "kind", intValue: nil)], debugDescription: "invalid kind", underlyingError: nil))
C:\Users\Simon\Projects\dwl\MiniMedieval\swift\
@deevus based on this file path, I think your project file path is too long (Swift on windows has issues with long file path See: https://github.com/migueldeicaza/SwiftGodot/issues/271#issuecomment-1837369818). Try moving your project somewhere like C:\MiniMedieval
and build from there
At this time, saying SwiftGodot supports Windows is extremely generous at best.
subst
for builds to work. This should be mentioned in the Windows instructions.Incremental builds frequently fail with permission errors:
lld-link: error: failed to write output 'S:.build\x86_64-unknown-windows-msvc\debug\SwiftGodotMacroLibrary.exe': permission denied or lld-link: error: failed to write output 'S:.build\x86_64-unknown-windows-msvc\debug\SwiftGodot.dll': permission denied
This could be because I set up my extension to load directly from the build directory, but that works fine on Mac and Linux and it's really nice to not have to manually copy files all the time.
SwiftGodot is practically unusable on Windows. The only practical workflow I can see is using Mac/Linux exclusively and then doing a final Windows build only for deployment, which means you effectively cannot collaborate with devs who use Windows exclusively (probably the most common game dev platform).
You basically need subst for builds to work. This should be mentioned in the Windows instructions.
Added to the docs.
The build is excruciatingly slow.
This is something that should be improved upstream, won't be solved here.
This could be because I set up my extension to load directly from the build directory, but that works fine on Mac and Linux and it's really nice to not have to manually copy files all the time.
This is a windows-ism, it does not allow a DLL to be open and written to. On Unix you can, but it can corrupt your running process and crash. The proper procedure is do never do this.
Reported slowdown upstream https://github.com/apple/swift/issues/72221
One possible workaround is to use precompiled versions of SwiftGodot. I used to use this on MacOS when I didn’t want to rebuild everything all the time. This is the reason I publish binaries for it.
sadly, binary packages are not supported outside macOS, but I ran into this post that shows how folks are working around that limitation. Perhaps we could try something like that:
https://forums.swift.org/t/our-journey-with-swift-thus-far-some-notes-and-reflections/70510
Has this issue been resolved? @migueldeicaza I have Windows 11 and somehow Swift 6.0 preview iirc I also have 5.10 to test against. I have a fairly capable system with both WSL and another Linux partition that I built GDExtension with (thank you so much by the way! <3)
I wish I can tell you I know what I am doing on Windows but I don't lol. But any help in the right direction might be useful.
When attempting to build a project on windows, It throws a ton of
lld-link
warnings, and eventually fails:note, I didn't include all
lld-link
warnings, because there are thousands of themPreviously, my project was able to be built for windows via github actions, but it seems now this also does not work
It seems to be getting caught on some part of the generated source I have attached a screenshot instead of pasting code just to include line numbers:
D:\\testproject\\src\\.build\\plugins\\outputs\\swiftgodot\\SwiftGodot\\CodeGeneratorPlugin\\GeneratedSources\\generated.swift:22774:25