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

In clojure.test, metadata seems to be missing #482

Closed
liquidz opened this issue Jun 17, 2020 · 2 comments
Closed

In clojure.test, metadata seems to be missing #482

liquidz opened this issue Jun 17, 2020 · 2 comments

Comments

@liquidz
Copy link

liquidz commented Jun 17, 2020

version

babashka v0.1.2

platform

macOS Catalina

problem

The metadata seems to be set on the code, but I can't refer it.
https://github.com/borkdude/babashka/blob/v0.1.2/src/babashka/impl/clojure/test.clj#L328-L337

repro

$ bb
Babashka v0.1.2 REPL.
Use :repl/quit or :repl/exit to quit the REPL.
Clojure rocks, Bash reaches.

user=> (require 'clojure.test)
nil
user=> (meta #'clojure.test/report)
nil
user=> (binding [clojure.test/report (constantly true)] nil)
java.lang.IllegalStateException: Can't dynamically bind non-dynamic var clojure.lang.MultiFn@108f010d0 [at line 3, column 1]

expected behavior

$ clj
Clojure 1.10.1
user=> (require 'clojure.test)
nil
user=> (meta #'clojure.test/report)
{:doc "Generic reporting function, may be overridden to plug in\n   different report formats (e.g., TAP, JUnit).  Assertions such as\n   'is' call 'report' to indicate results.  The argument given to\n   'report' will be a map with a :type key.  See the documentation at\n   the top of test_is.clj for more information on the types of\n   arguments for 'report'.", :dynamic true, :added "1.1", :line 324, :column 1, :file "clojure/test.clj", :name report, :ns #object[clojure.lang.Namespace 0x74960bfa "clojure.test"]}
user=> (binding [clojure.test/report (constantly true)] nil)
nil
@borkdude
Copy link
Collaborator

Fixed with d0939de

@borkdude
Copy link
Collaborator

Also made clojure.test/test-var dynamic: b6a517b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants