This isn’t a bug report (I can’t reproduce with the latest version of sci) but I’m dying to know why sci.core/eval-string hangs on trivial inputs (e.g. "0") on sci 0.2.7 if reitit is also included as a dependency. 😆 🤔
Ah!
Weirdly, I don’t even need to require reitit!
❯ nix-shell --pure -p clojure
[nix-shell:~]$ timeout -v 60 clojure -Srepro -Sdeps '{:deps {metosin/reitit {:mvn/version "0.5.18"} org.babashka/sci {:mvn/version "0.2.7"}}}' -M -e "(require '[sci.core :as sci]) (sci/eval-string \"0\")"
timeout: sending signal TERM to command 'clojure'Works fine if reitit is excluded:
[nix-shell:~]$ time clojure -Srepro -Sdeps '{:deps {org.babashka/sci {:mvn/version "0.2.7"}}}' -M -e "(require '[sci.core :as sci]) (sci/eval-string \"0\")"
0
real 0m4.011s
user 0m14.914s
sys 0m0.576sAlso works with sci 0.2.8:
[nix-shell:~]$ time clojure -Srepro -Sdeps '{:deps {metosin/reitit {:mvn/version "0.5.18"} org.babashka/sci {:mvn/version "0.2.8"}}}' -M -e "(require '[sci.core :as sci]) (sci/eval-string \"0\")"
0
real 0m4.263s
user 0m15.740s
sys 0m0.657sSimply requiring sci is fine, even with reitit:
[nix-shell:~]$ time clojure -Srepro -Sdeps '{:deps {metosin/reitit {:mvn/version "0.5.18"} org.babashka/sci {:mvn/version "0.2.7"}}}' -M -e "(require '[sci.core :as sci])"
real 0m4.255s
user 0m20.633s
sys 0m0.658sI’ve been staring at the 0.2.8 changelog and nothing stands out. 😆 https://github.com/babashka/sci/blob/master/CHANGELOG.md#v028
Probably because of Malli which included another version of sci under my personal GitHub account. Inspect the classpath, there's likely two versions of SCI on there