Replaced dependency on circe-generic-extras with circe-generic because (1) it hasn't been published for Scala 3, (2) I fiddled with the ability to use 2.13 libraries in Scala 3, but that caused some build warnings that were causing intellij to fail to load the project; (3) we're actually only using functionality from circe-generic.
Removed dependency on com.klibisz.futil because it's only published for 2.13 and was easier to just replace with a couple utility methods than to cross publish that library for scala 3.
Some minor syntactic changes, e.g., adding type annotations, wrapping anonymous function params in parens.
One test in PermutationLshModelSuite required rounding some floats that I was comparing, because they were consistently no longer equal at the seventh decimal. I'm not sure how that could be related to Scala 3. I got tired of looking at it and just truncated at the sixth decimal.
Had to slightly restructure the VectorMapper class because it was hitting a part of the scala runtime that invoked sun.misc.Unsafe. This was by far the most confusing part of the migration. I spent several hours trying to figure out why we needed to add elevated permissions to access sun.misc.unsafe. It seems to be related to this issue: https://github.com/scala/scala3/issues/9013. It was particularly confusing because the error is coming from scala.runtime.LazyVals, but I'm not using any LazyVals. Through trial and error, I figured out that converting an object inside an abstract class to a final class inside the same abstract class would circumvent the issue. The alternative would have been to add back several runtime permissions to plugin-security.policy, which I wanted to avoid.
Related Issue
Resolves #393
Changes
object
inside anabstract class
to afinal class
inside the sameabstract class
would circumvent the issue. The alternative would have been to add back several runtime permissions to plugin-security.policy, which I wanted to avoid.Testing and Validation
Standard CI.