Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic var *test-out* not properly bound when clojure.test is called from within the nrepl #1690

Open
publicimageltd opened this issue Apr 28, 2024 · 0 comments
Projects

Comments

@publicimageltd
Copy link

publicimageltd commented Apr 28, 2024

babashka version v1.3.189
CIDER version 1.14.0-snapshot
Emacs 29.1

When using clojure.test from Emacs (jacking in with CIDER), the test output to the terminal is lost:

user> (with-test-out (println "this will not be printed"))
nil
user> (= *test-out* *out*)
false

Expected behavior can be replicated when calling bb directly, however:

Babashka v1.3.189 REPL.
Use :repl/quit or :repl/exit to quit the REPL.
Clojure rocks, Bash reaches.

user=> (require '[clojure.test :refer :all])
nil
user=> (with-test-out (println "Hallo!"))
Hallo!
nil
user=>(= *test-out* *out*)
true 

The problem seems to be using the nrepl via CIDER, instead of in whatever way bb calls the REPL.

@borkdude borkdude added this to High priority in Babashka Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Babashka
High priority
Development

No branches or pull requests

1 participant