STREGAsGate/GateEngine

Build fails with many “No such module” errors

Closed this issue · 2 comments

Build fails on macOS Sonoma 14.2.1 with Xcode 15.2 building for iOS/iPadOS 17.2 device with many repeated “No such module” many repeated errors looking for modules “DOM”, “ECMAScript”, & “JavaScriptEventLoop”. Issues seem to occur both on main (77889f0) and latest version tag (0.1.2) via both this repo and the GateEngineDemos repo (which pulls down GateEngine 0.1.2). Fresh git clone (I've never used GateEngine before today).

This is related to changes made by the SwiftWASM project for their Swift 5.9 release.
Due to Xcode not fully supporting Swift Packages, JavaScriptKit is built for macOS targets.
I'll submit a patch for JavaScriptKit to fix these build errors.

I missed the targeting iOS part of this. Those modules are all for HTML5. The package manifest is likely throwing these errors out due to a previous build failure.

When building for iOS, you cannot use Swift Package Manager executables directly, you must wrap them in an Xcode project.
You must do this because Apple doesn't allow side loading on iOS, so every executable must mimic an App Store App including in-development apps.
This is not the case for macOS.

GateEngineDemos has an "Xcode" folder in it with an example of how you could wrap a Swift Package Manager executable into an Xcode project. Open the workspace file (white Xcode file).