problem: Subcommands which return a LazySeq seem to crash because the LazySeq is treated as a deferred value by getReturnValue, and P/waitForDeferredValue attempts to deref the LazySeq, causing the crash.
clojure.lang.LazySeq cannot be cast to java.util.concurrent.Future ...
See thesetwo files--note that in the former I am returning an :ok to work around this issue. If you remove the :ok from ingest-conllu-files and then make the call to ingest-conllu-files the last form inside ingest, the issue is triggered as the subcommand will then return the result of (doall (pmap ...))
expected behavior:
It seems like getReturnValue should never throw, so this is an unexpected behavior to me. The final form of my code ended up not needing this to work correctly anyway, since I finish the subcommand with some print statements, but I thought I'd mention this regardless.
version: 0.4.3
platform: JVM 14
problem: Subcommands which return a
LazySeq
seem to crash because theLazySeq
is treated as a deferred value bygetReturnValue
, andP/waitForDeferredValue
attempts to deref theLazySeq
, causing the crash.clojure.lang.LazySeq cannot be cast to java.util.concurrent.Future ...
repro:
See these two files--note that in the former I am returning an
:ok
to work around this issue. If you remove the:ok
fromingest-conllu-files
and then make the call toingest-conllu-files
the last form insideingest
, the issue is triggered as the subcommand will then return the result of(doall (pmap ...))
expected behavior:
It seems like
getReturnValue
should never throw, so this is an unexpected behavior to me. The final form of my code ended up not needing this to work correctly anyway, since I finish the subcommand with some print statements, but I thought I'd mention this regardless.