In a subcommand :runs, functions that return lazy sequences throw. This includes functions like map and lazy-seq. Simplest example I could come up with:
(fn [& _] (lazy-seq (cons 1 ())))
This is because cli-matic.platform/isJvmPromise? checks if the returned value is an instance of IPending, which is used for realizing values, not for dereferencing (delivering, completing, calculating) values.
Problem
In a subcommand
:runs
, functions that return lazy sequences throw. This includes functions likemap
andlazy-seq
. Simplest example I could come up with:This is because
cli-matic.platform/isJvmPromise?
checks if the returned value is an instance ofIPending
, which is used for realizing values, not for dereferencing (delivering, completing, calculating) values.Repro
Expected vs actual behavior
Should not throw, should default to 0.
Version / Platform
cli-matic 0.5.4, JVM 11, Clojure 1.11.1