Closed scarf005 closed 4 weeks ago
@WojciechMazur any clue what could be causing this?
That's the issue with the Scala Native 0.4.x series - it contained a dummy implementation (seen in logs) that was not marked with @stub
. Because of that linker assumes that it's a valid definition and includes it.
The scala-native-crypto
provides an alternative implementation of MessageDigest
, however, there is no mechanism that could check if there are multiple definitions somewhere on the classpath. Because of that linker picks the first implementation found on the classpath.
There is nothing that can fix in in the scala-cli. I'd recommended switching to Scala Native 0.5.x which has this issue fixed. Alternatively we could release the 0.4.18, however the 0.4.x series is in general no longer maintained or developed.
thanks for the detailed reply.
There is nothing that can fix in in the scala-cli. I'd recommended switching to Scala Native 0.5.x which has this issue fixed.
guess I'm stuck in a catch-22 situation; I can't use 0.5.x because cats-effect doesn't support it, and i can't use 0.4.x either because of #3141. maybe i should find another native-compatible crypto library.
Okay... seems there's nothing to fix on our side. Closing this.
Version(s) Scala CLI version: 1.5.0 Scala version (default): 3.5.0
Describe the bug unable to use https://github.com/lolgab/scala-native-crypto, a drop-in scala-native
java.security.MessageDigest
replacement library.To Reproduce
sudo dnf install openssl-devel
(or equivalent)scala-cli run repro.scala
Expected behaviour
it works in scala native.
Actual behaviour
scala-native-crypto isn't picked up.