Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests]: error: consecutive declarations on a line must be separated by ';' #2054

Open
LBeernaertProton opened this issue Mar 28, 2024 · 6 comments

Comments

@LBeernaertProton
Copy link

I am trying to run cargo test via the docker image and it is failing with the following error on main:

/mounted_workdir/target/tmp/uniffi-example-async-api-client-f44366ee4daea68c/async_api_client.swift:439:74: error: consecutive declarations on a line must be separated by ';'
    func getIssue(owner: String, repository: String, issueNumber: UInt32) async throws  -> Issue
                                                                         ^
                                                                         ;
/mounted_workdir/target/tmp/uniffi-example-async-api-client-f44366ee4daea68c/async_api_client.swift:439:75: error: expected declaration
    func getIssue(owner: String, repository: String, issueNumber: UInt32) async throws  -> Issue
                                                                          ^
/mounted_workdir/target/tmp/uniffi-example-async-api-client-f44366ee4daea68c/async_api_client.swift:437:17: note: in declaration of 'ApiClientProtocol'
public protocol ApiClientProtocol : AnyObject {
@LBeernaertProton LBeernaertProton changed the title [ztests]: error: consecutive declarations on a line must be separated by ';' [tests]: error: consecutive declarations on a line must be separated by ';' Mar 28, 2024
jmshrv added a commit to iguana-debugger/libiguana that referenced this issue Mar 30, 2024
@badboy
Copy link
Member

badboy commented Apr 2, 2024

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.

@LBeernaertProton
Copy link
Author

The version bundled with the docker file of the repo:

&& curl -o swift.tar.gz https://download.swift.org/swift-5.5-release/ubuntu1804/swift-5.5-RELEASE/swift-5.5-RELEASE-ubuntu18.04.tar.gz \

@badboy
Copy link
Member

badboy commented Apr 3, 2024

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 eeb785c (current main as of this comment)

@LBeernaertProton
Copy link
Author

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?

@badboy
Copy link
Member

badboy commented Apr 11, 2024

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!)

@LBeernaertProton
Copy link
Author

Sorry for for the very late reply, but when switching to the image you suggested I am able to run the tests without issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants