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
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...