philss / rustler_precompiled

Use precompiled NIFs from trusted sources in your Elixir code
181 stars 25 forks source link

Error message not properly printed when a unsafe symlink found #34

Closed jackalcooper closed 1 year ago

jackalcooper commented 1 year ago

when downloading and loading the tar contains a symlink:

== Compilation error in file lib/beaver/mlir/capi.ex ==
** (Protocol.UndefinedError) protocol String.Chars not implemented for {'[a path to an unsafe symlink]', :unsafe_symlink} of type Tuple
    (elixir 1.14.0) lib/string/chars.ex:3: String.Chars.impl_for!/1
    (elixir 1.14.0) lib/string/chars.ex:22: String.Chars.to_string/1
    (rustler_precompiled 0.5.2) lib/rustler_precompiled.ex:126: RustlerPrecompiled.__using__/2
    lib/beaver/mlir/capi.ex:37: (module)
philss commented 1 year ago

@jackalcooper would you mind to share the code or give more details?

jackalcooper commented 1 year ago
philss commented 1 year ago

@jackalcooper can you check if you are publishing the package correctly? You shouldn't include the compiled files in your package, because you can't guarantee that the user is running in the same architecture as you are.

If you can create a small package reproducing the issue, would be easier to investigate.

jackalcooper commented 1 year ago

close because a workaround is found