Last active
November 10, 2018 15:29
-
-
Save borkdude/145d9433d9e8cc386d40495849b0b3c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns repro.core | |
(:require | |
[repro.macros :refer [my-macro]])) | |
(def default-opts {}) | |
(defn -main [& args] | |
(println "main:") | |
(println (my-macro `str default-opts))) | |
#?(:cljs (set! *main-cli-fn* -main)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns repro.macros | |
(:require [clojure.spec.test.alpha]) | |
#?(:cljs (:require-macros [repro.macros :refer [my-macro]]))) | |
#?(:clj (defmacro my-macro [sym opts] | |
`(let [opts# (assoc-in ~opts [:clojure.test.check :num-tests] 1)] | |
(clojure.spec.test.alpha/with-instrument-disabled | |
(clojure.spec.test.alpha/check ~sym ~opts))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clj -Srepro -m cljs.main -re node -m repro.core | |
WARNING: No such namespace: clojure.spec.test.alpha, could not locate clojure/spec/test/alpha.cljs, clojure/spec/test/alpha.cljc, or JavaScript source providing "clojure.spec.test.alpha" at line 9 core.cljc | |
WARNING: Use of undeclared Var clojure.spec.test.alpha/check at line 9 core.cljc | |
main: | |
(node:97191) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead. | |
Exception in thread "main" clojure.lang.ExceptionInfo: repl:25 | |
return clojure.spec.test.alpha.check(new cljs.core.Symbol("cljs.core","str","cljs.core/str",-1971828991,null),repro.core.default_opts); | |
^ | |
TypeError: Cannot read property 'test' of undefined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment