You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 13, 2021. It is now read-only.
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 please tut, 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.
The above call to Primitive.json already outputs the implicit tut 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.
The text was updated successfully, but these errors were encountered:
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.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.The text was updated successfully, but these errors were encountered: