Closed olivermt closed 5 years ago
Hi. I'm on holiday at the moment, but I will look at this issue when I get back home - on Wednesday.
First, about the symlinking of the priv directory, as far as I am aware, that is part of the Elixir build process.
About the issue you are facing, what errors do you get if you do not run mix deps.compile argon2_elixir --force
?
Hi!
I am on vacay away from the I set up the reproducing for this, but paraphrased from my memory:
This is most likely because the nif is tagged as compiled when elixir-ls compiles it from windows, but there is only a dll, not the .so that linux requires.
Ok. When you get back, if you could show me the error message, then I will be able to help you more.
Enjoy your vacation :)
Thanks I did! (And I forgot this issue until I got deep enough in the mail pile)
I am not able to reproduce it now, when back on the proper computer. Will reopen if I figure out a way to reliably reproduce.
Hi!
The current pattern of using symlink for priv folder for the built dlls/so breaks in the current format. I have not encountered other libs doing this as of yet.
The reason this is a problem is that I run vscode with elixir-ls from windows, so it compiles its own stuff to .elixir-ls. The way you compile in argon2_elixir means that you then create a dll in the priv folder and this is symlinked to the build folder in elixir-ls.
To make it run in wsl you then have to mix deps.compile argon2_elixir --force, because the dll is already compiled and symlinked to the windows side.
In general it feels a bit strange to symlink deps this way as it makes dep compiling less deterministic imo.
I haven't really looked at what it takes to alter this behaviour, but if its more than a few minutes effort I could look into doing a PR for this over xmas.
Cheers!