fastjames / ex-gpgme

Elixir NIF for GPGME
MIT License
0 stars 0 forks source link

Establish compatibility with OTP 23+, Elixir 1.12+ #5

Open fastjames opened 2 years ago

fastjames commented 2 years ago

In order to stay current with elixir / OTP releases, we need to verify that the library compiles and runs tests under more recent versions of elixir and erlang.

While the CI test matrix currently covers elixir 1.12 and OTP 23, my local tests do not run under that version combo. Instead, either one test runs or no tests run and the mix test execution never completes.

fastjames commented 2 years ago

I have tested a couple of combinations locally and observed the following results (version strings below are from asdf):

fastjames commented 2 years ago

I was able to get newer versions working in CI by updating rustler to 0.25.0. I am still unable to run tests locally on my m1 mac with any OTP above 22.

fastjames commented 2 years ago

Elixir 1.13.x appears to work (with OTP 22), so that's progress.

fastjames commented 2 years ago

I have updated all of the outdated dependencies, but the problem I originally observed where tests hang is still present with elixir 1.13.4 and OTP 23. I will ask a question on the relevant slack / matrix channels for rustler.

fastjames commented 2 years ago

I tried running the test suite on a system running Ubuntu 22, under elixir 1.13.1 / OTP24. The tests ran, but I got several failures allo f which included the error "No secret key" or "Unusable secret key." I'm not sure why that would happen on this system, but perhaps there is a newer library here that's not compatible with our current dependency set.

fastjames commented 2 years ago

I was able to run a linux VM locally (ubuntu 22 / arm64), and I got the same three test failures:

Also, I was unable to get the library to build with OTP 23 as it returned several warnings and errors around OpenSSL function name conflicts. Switching to OTP 24 allowed the library to build as expected.

fastjames commented 2 years ago

I ran mix test --trace in my local M1 mac setup, and I observed the following output:

❯ mix test --trace
Excluding tags: [:manual_pinentry]

ExGpgme.ContextTest [test/ex_gpgme/context_test.exs]
  * test delete_secret_key/2 really deletes key (excluded) [L#275]
  * test from_protocol/1 gives argument error on wrong params (2.8ms) [L#128]
  * test sign/3 creates correct signature [L#285]

It appears that one test ran successfully, but the test for sign/3 never completed or failed.

fastjames commented 2 years ago

I opened https://github.com/rusterlium/rustler/issues/480 since I had enough information to narrow the scope of the problem.