NordSecurity / uniffi-bindgen-go

Uniffi bindings generator for Golang
Mozilla Public License 2.0
73 stars 20 forks source link

Fail to run the tests #54

Open Hywan opened 2 weeks ago

Hywan commented 2 weeks ago

Hello,

I've found a bug in uniffi-bindgen-go and I'm trying to run the tests locally.

From a fresh clone (with submodule):

$ ./docker_build.sh
# … all good…
$ ./docker_test_bindings.sh
…
++ cd .
++ pwd
+ SCRIPT_DIR=/mounted_workdir
+ ROOT_DIR=/mounted_workdir
+ BINDINGS_DIR=/mounted_workdir/binding_tests
+ BINARIES_DIR=/mounted_workdir/target/debug
+ pushd /mounted_workdir/binding_tests
/mounted_workdir/binding_tests /mounted_workdir
+ LD_LIBRARY_PATH=:/mounted_workdir/target/debug
+ CGO_LDFLAGS='-luniffi_fixtures -L/mounted_workdir/target/debug -lm -ldl'
+ CGO_ENABLED=1
+ go test -v
# github.com/NordSecurity/uniffi-bindgen-go/binding_tests
arithmetic_test.go:10:2: no required module provides package github.com/NordSecurity/uniffi-bindgen-go/binding_tests/generated/arithmetic; to add it:
        go get github.com/NordSecurity/uniffi-bindgen-go/binding_tests/generated/arithmetic
FAIL    github.com/NordSecurity/uniffi-bindgen-go/binding_tests [setup failed]

I'm following the steps from the CONTRIBUTING.md file, which are the same as on your CI, but sadly it doesn't work. I'm not familiar with Go, any help you'll be welcome.

Hywan commented 2 weeks ago

The Go version in the Docker image is 1.19. On your CI, it's 1.20. It seems to be the problem. Fixed by https://github.com/NordSecurity/uniffi-bindgen-go/pull/55.