exercises-cats
exercises-cats copied to clipboard
java.lang.NoClassDefFoundError: cats/free/Inject$ building master
I was going to see if I could debug why the Applicative composition exercise doesn't display correctly and in trying to build exercises-cats, I ran into the NoClassDefFoundError above.
I checked on another computer and then tried the hseeberger/scala-sbt docker image to make sure I was starting clean. I got the same result all three times.
Steps to reproduce with hseeberger/scala-sbt docker image:
- sudo docker run -it --rm hseeberger/scala-sbt
- git clone https://github.com/scala-exercises/exercises-cats.git
- cd exercises-cats/
- sbt compile publishLocal
These steps should yield this stack trace:
java.lang.NoClassDefFoundError: cats/free/Inject$
at github4s.Github.repos$lzycompute(Github.scala:40)
at github4s.Github.repos(Github.scala:40)
at org.scalaexercises.compiler.Compiler.org$scalaexercises$compiler$Compiler$$fetchContributions$1(Compiler.scala:163)
As a quick attempt to fix this, I added cats-free to the build.sbt file, and this yielded another stack trace.
java.lang.NoSuchMethodError: cats.free.Free.foldMap(Lcats/arrow/FunctionK;Lcats/Monad;)Ljava/lang/Object;
at github4s.Github$GithubIOSyntaxEither.execK(Github.scala:58)
at github4s.Github$GithubIOSyntaxEither.exec(Github.scala:64)
at org.scalaexercises.compiler.Compiler.org$scalaexercises$compiler$Compiler$$fetchContributions$1(Compiler.scala:167)
It looks like I need another version of cats-free, but I'm not sure which one.