philss / rustler_precompiled

Use precompiled NIFs from trusted sources in your Elixir code
182 stars 26 forks source link

Fix `mix rustler_precompiled.download` #20

Closed adriankumpf closed 2 years ago

adriankumpf commented 2 years ago

I made a mistake in #17 and removed available_targets/0:

https://github.com/philss/rustler_precompiled/blob/bb146da433b05d7192db732a0c9b10dc6d634074/lib/rustler_precompiled.ex#L156-L163

This causes mix rustler_precompiled.download YourRustlerModule --all --print to fail as it tries to download e.g. libyour_rust_module_nif-v0.1.0-x86_64-unknown-linux-musl.so.tar.gz without the NIF version.

Ideally we'd also have a test for it. I'll look into it but the cached metadata file makes it a bit tricky.

philss commented 2 years ago

@adriankumpf no problem. Thanks for the quick fix! I'm going to release 0.5.1 since I can´t remove the previous version from hex (1 hour has passed).

philss commented 2 years ago

@adriankumpf done. Please try with version 0.5.1.

adriankumpf commented 2 years ago

Tested with 0.5.1 and that does the trick. Thanks for the quick response. And sorry again for the trouble!