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
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.
The text was updated successfully, but these errors were encountered:
lgessler
changed the title
Return value from (doall ...)
Return value from (doall ...) causes getReturnValue to throw
Dec 7, 2021
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.The text was updated successfully, but these errors were encountered: