Open alexflav23 opened 7 years ago
I'm pretty late to seeing this, but I think that the issue here is just that the REPL takes one line at a time (unless you are in :paste
mode, which tut doesn't use), so it doesn't actually end up treating object JsonRecord
as the companion object for class JsonRecord
, and therefore the members of object JsonRecord
aren't in the implicit search for JsonRecord
types. You should be able to get around this by wrapping your whole chunk of code in something silly like object Example { ... }
so that it all gets processed by the REPL at once.
I've been trying to integrate
tut
for phantom documentation, however I am experiencing strange behaviour with implicits. Placing implicits in a companion object doesn't seem to pleasetut
, even if the regular compiler has no trouble with this.The code in question is found below for reference, and works perfectly with the normal compiler, but fails in
tut
.h4. Tut compilation
The above call to
Primitive.json
already outputs the implicittut
is unable to find in the below example. Even manually importing the companion object seems to have no effect whatsoever on the outcome.Is there a known limitation in compiling implicits and how can this be circumvented? It's causing
tut
to hang infinitely and block the SBT process without even completing with a build failure, so our CI winds up unresponsive for 20 minutes plus at a time.