Open LBeernaertProton opened 5 months ago
What's the output of swiftc --version
on your machine?
I think it might be outdated and the error here makes me believe that your version of Swift doesn't know async
yet.
async/await was implemented in Swift 5.5.
The version bundled with the docker file of the repo:
I currently cannot reproduce that in Docker:
$ docker build -t rfkelly/uniffi-ci -f docker/Dockerfile-build .
$ docker run \
-ti --rm \
-v $HOME/.cargo/registry:/usr/local/cargo/registry \
-v $PWD:/mounted_workdir \
-w /mounted_workdir \
rfkelly/uniffi-ci:latest bash
# CARGO_TARGET_DIR=/tmp/target cargo test -p uniffi-example-async-api-client
<snip>
test uniffi_foreign_language_testcase_test_async_api_client_swift ... ok
<snip>
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 8.64s
This is on eeb785c571fb137049c9f9c1c38b7c422d183322 (current main
as of this comment)
Hmm, i had some issues building the image with podam, so i tried to use the image from the docker registry. Maybe that image is not up to date?
We're using it in CI. :)
Are you using janerik/uniffi-ci-test:latest
?
.... and only just now I realize that we do reference the old name (rfkelly/uniffi-ci
) in the docs (and in my command above, d'oh!)
Sorry for for the very late reply, but when switching to the image you suggested I am able to run the tests without issues.
I am trying to run
cargo test
via the docker image and it is failing with the following error on main: