We're updating the issue view to help you get more done. 

Unable to eval some forms passed to instrument

Description

The following REPL sequence works in Clojure and also downstream in self-hosted ClojureScript Planck, but not in JVM ClojureScript:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 $ clj -m cljs.main -re node -r ClojureScript 1.10.439 cljs.user=> (require '[clojure.spec.test.alpha :as st]) nil cljs.user=> (require '[clojure.spec.alpha :as s]) nil cljs.user=> (defn foo [x] (inc x)) #'cljs.user/foo cljs.user=> (defn bar [x] (inc x)) #'cljs.user/bar cljs.user=> (s/fdef foo :args (s/cat :x int?)) cljs.user/foo cljs.user=> (s/fdef bar :args (s/cat :x int?)) cljs.user/bar cljs.user=> (st/instrumentable-syms) #{cljs.user/foo cljs.user/bar} cljs.user=> (disj (st/instrumentable-syms) `bar) #{cljs.user/foo} cljs.user=> (st/instrument (disj (st/instrumentable-syms) `bar)) clojure.lang.ExceptionInfo: Syntax error compiling at (1:16). at line 1 <cljs repl> {:file "<cljs repl>", :line 1, :column 1, :root-source-info {:source-type :fragment, :source-form (st/instrument (disj (st/instrumentable-syms) (quote cljs.user/bar)))}, :tag :cljs/analysis-error} at cljs.analyzer$error.invokeStatic(analyzer.cljc:718) at cljs.analyzer$error.invoke(analyzer.cljc:714) at cljs.analyzer$macroexpand_1.invokeStatic(analyzer.cljc:3594) at cljs.analyzer$macroexpand_1.invoke(analyzer.cljc:3590) at cljs.analyzer$analyze_seq.invokeStatic(analyzer.cljc:3627) at cljs.analyzer$analyze_seq.invoke(analyzer.cljc:3607) at cljs.analyzer$analyze_form.invokeStatic(analyzer.cljc:3810) at cljs.analyzer$analyze_form.invoke(analyzer.cljc:3807) at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:3860) at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:3851) at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3880) at cljs.analyzer$analyze.invoke(analyzer.cljc:3863) at cljs.analyzer$analyze_seq.invokeStatic(analyzer.cljc:3630) at cljs.analyzer$analyze_seq.invoke(analyzer.cljc:3607) at cljs.analyzer$analyze_form.invokeStatic(analyzer.cljc:3810) at cljs.analyzer$analyze_form.invoke(analyzer.cljc:3807) at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:3860) at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:3851) at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3880) at cljs.analyzer$analyze.invoke(analyzer.cljc:3863) at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3873) at cljs.analyzer$analyze.invoke(analyzer.cljc:3863) at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3871) at cljs.analyzer$analyze.invoke(analyzer.cljc:3863) at cljs.analyzer$analyze_let_binding_init.invokeStatic(analyzer.cljc:2062) at cljs.analyzer$analyze_let_binding_init.invoke(analyzer.cljc:2060) at cljs.analyzer$analyze_let_bindings_STAR_.invokeStatic(analyzer.cljc:2082) at cljs.analyzer$analyze_let_bindings_STAR_.invoke(analyzer.cljc:2071) at cljs.analyzer$analyze_let_bindings.invokeStatic(analyzer.cljc:2114) at cljs.analyzer$analyze_let_bindings.invoke(analyzer.cljc:2113) at cljs.analyzer$analyze_let.invokeStatic(analyzer.cljc:2130) at cljs.analyzer$analyze_let.invoke(analyzer.cljc:2124) at cljs.analyzer$fn__1898.invokeStatic(analyzer.cljc:2150) at cljs.analyzer$fn__1898.invoke(analyzer.cljc:2148) at clojure.lang.MultiFn.invoke(MultiFn.java:252) at cljs.analyzer$analyze_seq_STAR_.invokeStatic(analyzer.cljc:3600) at cljs.analyzer$analyze_seq_STAR_.invoke(analyzer.cljc:3598) at cljs.analyzer$analyze_seq_STAR__wrap.invokeStatic(analyzer.cljc:3605) at cljs.analyzer$analyze_seq_STAR__wrap.invoke(analyzer.cljc:3603) at cljs.analyzer$analyze_seq.invokeStatic(analyzer.cljc:3629) at cljs.analyzer$analyze_seq.invoke(analyzer.cljc:3607) at cljs.analyzer$analyze_form.invokeStatic(analyzer.cljc:3810) at cljs.analyzer$analyze_form.invoke(analyzer.cljc:3807) at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:3860) at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:3851) at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3880) at cljs.analyzer$analyze.invoke(analyzer.cljc:3863) at cljs.analyzer$analyze_seq.invokeStatic(analyzer.cljc:3630) at cljs.analyzer$analyze_seq.invoke(analyzer.cljc:3607) at cljs.analyzer$analyze_form.invokeStatic(analyzer.cljc:3810) at cljs.analyzer$analyze_form.invoke(analyzer.cljc:3807) at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:3860) at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:3851) at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3880) at cljs.analyzer$analyze.invoke(analyzer.cljc:3863) at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3873) at cljs.analyzer$analyze.invoke(analyzer.cljc:3863) at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3871) at cljs.analyzer$analyze.invoke(analyzer.cljc:3863) at cljs.analyzer$parse_invoke_STAR_$ana_expr__2396.invoke(analyzer.cljc:3373) at clojure.core$mapv$fn__8436.invoke(core.clj:6892) at clojure.lang.PersistentList.reduce(PersistentList.java:141) at clojure.core$reduce.invokeStatic(core.clj:6807) at clojure.core$mapv.invokeStatic(core.clj:6883) at clojure.core$mapv.invoke(core.clj:6883) at cljs.analyzer$parse_invoke_STAR_.invokeStatic(analyzer.cljc:3374) at cljs.analyzer$parse_invoke_STAR_.invoke(analyzer.cljc:3322) at cljs.analyzer$parse_invoke.invokeStatic(analyzer.cljc:3380) at cljs.analyzer$parse_invoke.invoke(analyzer.cljc:3378) at cljs.analyzer$analyze_seq_STAR_.invokeStatic(analyzer.cljc:3601) at cljs.analyzer$analyze_seq_STAR_.invoke(analyzer.cljc:3598) at cljs.analyzer$analyze_seq_STAR__wrap.invokeStatic(analyzer.cljc:3605) at cljs.analyzer$analyze_seq_STAR__wrap.invoke(analyzer.cljc:3603) at cljs.analyzer$analyze_seq.invokeStatic(analyzer.cljc:3629) at cljs.analyzer$analyze_seq.invoke(analyzer.cljc:3607) at cljs.analyzer$analyze_form.invokeStatic(analyzer.cljc:3810) at cljs.analyzer$analyze_form.invoke(analyzer.cljc:3807) at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:3860) at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:3851) at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3880) at cljs.analyzer$analyze.invoke(analyzer.cljc:3863) at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3873) at cljs.analyzer$analyze.invoke(analyzer.cljc:3863) at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3871) at cljs.analyzer$analyze.invoke(analyzer.cljc:3863) at cljs.analyzer$fn__1879.invokeStatic(analyzer.cljc:2041) at cljs.analyzer$fn__1879.invoke(analyzer.cljc:2037) at clojure.lang.MultiFn.invoke(MultiFn.java:252) at cljs.analyzer$analyze_seq_STAR_.invokeStatic(analyzer.cljc:3600) at cljs.analyzer$analyze_seq_STAR_.invoke(analyzer.cljc:3598) at cljs.analyzer$analyze_seq_STAR__wrap.invokeStatic(analyzer.cljc:3605) at cljs.analyzer$analyze_seq_STAR__wrap.invoke(analyzer.cljc:3603) at cljs.analyzer$analyze_seq.invokeStatic(analyzer.cljc:3629) at cljs.analyzer$analyze_seq.invoke(analyzer.cljc:3607) at cljs.analyzer$analyze_form.invokeStatic(analyzer.cljc:3810) at cljs.analyzer$analyze_form.invoke(analyzer.cljc:3807) at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:3860) at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:3851) at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3880) at cljs.analyzer$analyze.invoke(analyzer.cljc:3863) at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3873) at cljs.analyzer$analyze.invoke(analyzer.cljc:3863) at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3871) at cljs.analyzer$analyze.invoke(analyzer.cljc:3863) at cljs.analyzer$fn__1729$fn__1753.invoke(analyzer.cljc:1564) at cljs.analyzer$fn__1729.invokeStatic(analyzer.cljc:1564) at cljs.analyzer$fn__1729.invoke(analyzer.cljc:1511) at clojure.lang.MultiFn.invoke(MultiFn.java:252) at cljs.analyzer$analyze_seq_STAR_.invokeStatic(analyzer.cljc:3600) at cljs.analyzer$analyze_seq_STAR_.invoke(analyzer.cljc:3598) at cljs.analyzer$analyze_seq_STAR__wrap.invokeStatic(analyzer.cljc:3605) at cljs.analyzer$analyze_seq_STAR__wrap.invoke(analyzer.cljc:3603) at cljs.analyzer$analyze_seq.invokeStatic(analyzer.cljc:3629) at cljs.analyzer$analyze_seq.invoke(analyzer.cljc:3607) at cljs.analyzer$analyze_form.invokeStatic(analyzer.cljc:3810) at cljs.analyzer$analyze_form.invoke(analyzer.cljc:3807) at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:3860) at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:3851) at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3880) at cljs.analyzer$analyze.invoke(analyzer.cljc:3863) at cljs.repl$evaluate_form$__GT_ast__6567.invoke(repl.cljc:517) at cljs.repl$evaluate_form.invokeStatic(repl.cljc:519) at cljs.repl$evaluate_form.invoke(repl.cljc:499) at cljs.repl$eval_cljs.invokeStatic(repl.cljc:689) at cljs.repl$eval_cljs.invoke(repl.cljc:682) at cljs.repl$repl_STAR_$read_eval_print__6752.invoke(repl.cljc:985) at cljs.repl$repl_STAR_$fn__6758$fn__6767.invoke(repl.cljc:1026) at cljs.repl$repl_STAR_$fn__6758.invoke(repl.cljc:1025) at cljs.compiler$with_core_cljs.invokeStatic(compiler.cljc:1416) at cljs.compiler$with_core_cljs.invoke(compiler.cljc:1405) at cljs.repl$repl_STAR_.invokeStatic(repl.cljc:988) at cljs.repl$repl_STAR_.invoke(repl.cljc:861) at cljs.cli$repl_opt.invokeStatic(cli.clj:314) at cljs.cli$repl_opt.invoke(cli.clj:301) at cljs.cli$main.invokeStatic(cli.clj:646) at cljs.cli$main.doInvoke(cli.clj:635) at clojure.lang.RestFn.applyTo(RestFn.java:139) at clojure.core$apply.invokeStatic(core.clj:667) at clojure.core$apply.invoke(core.clj:660) at cljs.main$_main.invokeStatic(main.clj:61) at cljs.main$_main.doInvoke(main.clj:52) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.lang.Var.applyTo(Var.java:705) at clojure.core$apply.invokeStatic(core.clj:665) at clojure.main$main_opt.invokeStatic(main.clj:469) at clojure.main$main_opt.invoke(main.clj:465) at clojure.main$main.invokeStatic(main.clj:576) at clojure.main$main.doInvoke(main.clj:539) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.lang.Var.applyTo(Var.java:705) at clojure.main.main(main.java:37) Caused by: Syntax error compiling at (1:16). Unable to resolve symbol: disj in this context at clojure.lang.Compiler.analyze(Compiler.java:6808) at clojure.lang.Compiler.analyze(Compiler.java:6745) at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3820) at clojure.lang.Compiler.analyzeSeq(Compiler.java:7110) at clojure.lang.Compiler.analyze(Compiler.java:6789) at clojure.lang.Compiler.analyze(Compiler.java:6745) at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6120) at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5467) at clojure.lang.Compiler$FnExpr.parse(Compiler.java:4029) at clojure.lang.Compiler.analyzeSeq(Compiler.java:7106) at clojure.lang.Compiler.analyze(Compiler.java:6789) at clojure.lang.Compiler.eval(Compiler.java:7175) at clojure.lang.Compiler.eval(Compiler.java:7133) at clojure.core$eval.invokeStatic(core.clj:3214) at clojure.core$eval.invoke(core.clj:3210) at cljs.spec.test.alpha$form__GT_sym_or_syms.invokeStatic(alpha.cljc:99) at cljs.spec.test.alpha$form__GT_sym_or_syms.invoke(alpha.cljc:90) at cljs.spec.test.alpha$instrument.invokeStatic(alpha.cljc:145) at cljs.spec.test.alpha$instrument.invoke(alpha.cljc:101) at clojure.lang.AFn.applyToHelper(AFn.java:165) at clojure.lang.AFn.applyTo(AFn.java:144) at clojure.core$apply.invokeStatic(core.clj:669) at clojure.core$apply.invoke(core.clj:660) at cljs.analyzer$macroexpand_1_STAR_$fn__2437.invoke(analyzer.cljc:3547) at cljs.analyzer$macroexpand_1_STAR_.invokeStatic(analyzer.cljc:3546) at cljs.analyzer$macroexpand_1_STAR_.invoke(analyzer.cljc:3533) ... 149 more Caused by: java.lang.RuntimeException: Unable to resolve symbol: disj in this context at clojure.lang.Util.runtimeException(Util.java:221) at clojure.lang.Compiler.resolveIn(Compiler.java:7415) at clojure.lang.Compiler.resolve(Compiler.java:7359) at clojure.lang.Compiler.analyzeSymbol(Compiler.java:7320) at clojure.lang.Compiler.analyze(Compiler.java:6768) ... 174 more

Environment

None

Status

Assignee

Mike Fikes

Reporter

Mike Fikes

Labels

Approval

None

Patch

None

Priority

Minor