swifweb/webber

Invalid manifests

Closed this issue ยท 6 comments

I wanted to try this out, but I can't get it running, I always get this error:

Build failed: failed to build module 'PackageDescription' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug
import PackageDescription
       ^
error: invalid manifests at [<AbsolutePath:"/Users/X/X/TestWebsite">]

I'm using macOS 14.4 and Xcode 15.3, also just downloaded it via brew.

Hey, are you trying to build it using webber? Please try to explain step by step what you are doing and I'd love to assist to make it work

Same issue, here.

Step by step:

  1. webber new
    .....

New project has been created!
2. cd project
3. webber serve -t project -s Service -p 443

Toolchain has been found at /Users/blabla/Developer/Toolchains/swift-wasm-5.7.1-RELEASE.xctoolchain/usr/bin
SwiftWasm Swift version 5.7.1 (swiftlang-5.7.1)
Target: arm64-apple-darwin23.5.0

  1. I get the error:
    Build failed: failed to build module 'PackageDescription' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug
    import PackageDescription
    ^
    error: invalid manifests at [AbsolutePath:"/Users/blabla/experiments/project"]

Any assistance is welcomed.

Thanks,
Claudius

Thanks for the report guys, I appreciate it

Seems 5.7.1 just stopped working when you updated macOS

Could you please try to use newer toolchain like this

webber serve -t project -s Service -p 443 --toolchain 5.9-SNAPSHOT-2023-08-06-a

You also could try 5.10 toolchain as well e.g. --toolchain 5.10-SNAPSHOT-2024-04-26-a or any snapshot available here

๐Ÿ’ก Don't forget to update webber to have --toolchain argument support
๐Ÿ’ก๐Ÿ’ก And don't forget to do rm -rf .build before trying new toolchain

Great. That works. Thanks!

@hc-claudius thanks!

Btw have you tried Embedded Swift yet? I adapted JavaScriptKit to work in that mode and prepared demo app that you can try out. It compiles into a 140Kb wasm file, which is only 48Kb when gzipped. I'm planning to make the web package work in Embedded Swift mode as well.

Iโ€™m curious about your thoughts on Embedded Swift from a WebAssembly perspective. Would limitations in Embedded Swift be a dealbreaker for you?

Hi @MihaelIsaev,

I didn't tried Embedded Swift yet; I have tried your https://github.com/swifweb/LightWebApp but didn't manage to get it to run.

Either way, I am not a big fan of WebAssembly. For now trying to fill a gap in the Swift for web stack (especially client side), WebAssembly will do, but again, I hope other options will come out (I am still exploring, trying things out, maybe I find a good prospect). As for Embedded Swift, I think is a great idea to have it, but I will not use it, and I don't see it feasible from the WebAssembly type of perspective.

"Would limitations in Embedded Swift be a dealbreaker for you?" -> it will be a dealbreaker in the context of the project specs, where you try to fit it in. I don't know, if it will be a good fit for the web, if this is where you want to go with this question (especially thru WebAssembly).

I too dream of a future where I can write swift and for it to be platform agnostic. I think that we need a new, fresh approach, to achieve this.

Hope this was helpful,