I am working on a function in swift that previously only had one dependency and it worked fine. Since adding a second dependency the deployment fails instantly. Changing Package.swift to have only one of either dependency works fine but I can't add both without getting the attached error. Here is my Package.swift
// swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "send-message",
dependencies: [
.package(url: "https://github.com/apple/swift-crypto.git", from: "2.0.3"),
.package(url: "https://github.com/swift-server/async-http-client.git", from: "1.9.0"),
],
targets: [
.target(
name: "send-message",
dependencies: [
.product(name: "Crypto", package: "swift-crypto"),
.product(name: "AsyncHTTPClient", package: "async-http-client"),
]
)
]
)
hmm ya this might be a bug...
@Jake and @Meldiron, I think we're adding an extra comma here:
It'd be great if you could create an issue so that we don't lose track of this
Should the issue be opened on the open-runtimes repository or appwrite?
you can do appwrite
The issue has been created, https://github.com/appwrite/appwrite/issues/5863
and cc @dlohani because i noticed you're working on the new runtimes.
Thanks, I see you already have a fix π
Thank you for creating a fix so fast. How can I update my swift runtime with the changes?
hmm looks like i need to apply the fix on a different branch and then create a release. i'lll work on that today
Sounds good!
are you on cloud or self-hosting?
self hosting
ok on your server, can you try running:
docker pull openruntimes/swift:v3-5.5
then, try to build again
wait...
what's docker images output?
i think it's actually:
docker pull openruntimes/swift:v2-5.5
Im away from my computer rn, ill let you know in ~30 minutes
of course! no rush
I ran docker pull openruntimes/swift:v2-5.5 and I was able to build! Thank you for your help
[SOLVED] Errors when deploying swift function with multiple dependencies
Recommended threads
- Dokploy
Hey, I'm new here. I'm selfhosting via Dokploy, no issues regarding databases but however sites and functions don't work as SSL certificates can't generate. Can...
- Bug Report: Appwrite Cloud Functions β E...
Bug Report: Appwrite Cloud Functions β ERR_INVALID_CHAR on Execution Summary: There is a critical platform-level bug affecting Appwrite Cloud Functions in the ...
- Timed out waiting for runtime error
execution id 6a3e0791978712d81ee0 im having issue with appwrite function runtime performance. even after 4gbram and cpu same function sometimes completes in a...