ClojureScript

:require-macros should throw a sensible error if no macro file exists

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Activity

Hide
Jonas Enlund added a comment -

What would you consider to be a sensible error? The resulting stacktrace after a failed (:require [cljs.reader :include-macros true]) looks like this:

Exception in thread "main" clojure.lang.ExceptionInfo: failed compiling file:test/cljs/test_runner.cljs {:file #<File test/cljs/test_runner.cljs>}
at clojure.core$ex_info.invoke(core.clj:4327)
at cljs.compiler$compile_file.invoke(compiler.clj:1006)
at cljs.compiler$compile_root.invoke(compiler.clj:1059)
at cljs.closure$compile_dir.invoke(closure.clj:337)
at cljs.closure$eval2820$fn__2821.invoke(closure.clj:377)
at cljs.closure$eval2757$fn_2758$G2748_2765.invoke(closure.clj:288)
at cljs.closure$eval2807$fn__2808.invoke(closure.clj:391)
at cljs.closure$eval2757$fn_2758$G2748_2765.invoke(closure.clj:288)
at cljs.closure$build.invoke(closure.clj:940)
at cljs.closure$build.invoke(closure.clj:909)
at user$eval2998.invoke(cljsc.clj:21)
at clojure.lang.Compiler.eval(Compiler.java:6619)
at clojure.lang.Compiler.load(Compiler.java:7064)
at clojure.lang.Compiler.loadFile(Compiler.java:7020)
at clojure.main$load_script.invoke(main.clj:294)
at clojure.main$script_opt.invoke(main.clj:356)
at clojure.main$main.doInvoke(main.clj:440)
at clojure.lang.RestFn.invoke(RestFn.java:436)
at clojure.lang.Var.invoke(Var.java:423)
at clojure.lang.AFn.applyToHelper(AFn.java:167)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.main.main(main.java:37)
Caused by: clojure.lang.ExceptionInfo: Could not locate cljs/reader__init.class or cljs/reader.clj on classpath: at line 1 /home/jonas/dev/clojure/clojurescript/test/cljs/foo/ns_shadow_test.cljs {:tag :cljs/analysis-error, :file "/home/jonas/dev/clojure/clojurescript/test/cljs/foo/ns_shadow_test.cljs", :line 1, :column 1}
at clojure.core$ex_info.invoke(core.clj:4327)
at cljs.analyzer$error.invoke(analyzer.clj:267)
at cljs.analyzer$analyze_seq.invoke(analyzer.clj:1415)
at cljs.analyzer$analyze$fn__1517.invoke(analyzer.clj:1506)
at cljs.analyzer$analyze.invoke(analyzer.clj:1499)
at cljs.analyzer$analyze.invoke(analyzer.clj:1494)
at cljs.analyzer$analyze_file$fn__1534.invoke(analyzer.clj:1575)
at cljs.analyzer$analyze_file.invoke(analyzer.clj:1569)
at cljs.analyzer$analyze_deps.invoke(analyzer.clj:963)
at cljs.analyzer$eval1306$fn__1308.invoke(analyzer.clj:1131)
at clojure.lang.MultiFn.invoke(MultiFn.java:241)
at cljs.analyzer$analyze_seq.invoke(analyzer.clj:1417)
at cljs.analyzer$analyze$fn__1517.invoke(analyzer.clj:1506)
at cljs.analyzer$analyze.invoke(analyzer.clj:1499)
at cljs.analyzer$analyze.invoke(analyzer.clj:1494)
at cljs.compiler$compile_file_STAR_.invoke(compiler.clj:885)
at cljs.compiler$compile_file.invoke(compiler.clj:999)
... 20 more
Caused by: java.io.FileNotFoundException: Could not locate cljs/reader__init.class or cljs/reader.clj on classpath:
at clojure.lang.RT.load(RT.java:443)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5018.invoke(core.clj:5530)
at clojure.core$load.doInvoke(core.clj:5529)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5336)
at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
at clojure.core$load_lib.doInvoke(core.clj:5374)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$load_libs.doInvoke(core.clj:5413)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$require.doInvoke(core.clj:5496)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at cljs.analyzer$eval1306$fn__1308.invoke(analyzer.clj:1137)
at clojure.lang.MultiFn.invoke(MultiFn.java:241)
at cljs.analyzer$analyze_seq.invoke(analyzer.clj:1417)
... 34 more

Show
Jonas Enlund added a comment - What would you consider to be a sensible error? The resulting stacktrace after a failed (:require [cljs.reader :include-macros true]) looks like this:
Exception in thread "main" clojure.lang.ExceptionInfo: failed compiling file:test/cljs/test_runner.cljs {:file #<File test/cljs/test_runner.cljs>} at clojure.core$ex_info.invoke(core.clj:4327) at cljs.compiler$compile_file.invoke(compiler.clj:1006) at cljs.compiler$compile_root.invoke(compiler.clj:1059) at cljs.closure$compile_dir.invoke(closure.clj:337) at cljs.closure$eval2820$fn__2821.invoke(closure.clj:377) at cljs.closure$eval2757$fn_2758$G2748_2765.invoke(closure.clj:288) at cljs.closure$eval2807$fn__2808.invoke(closure.clj:391) at cljs.closure$eval2757$fn_2758$G2748_2765.invoke(closure.clj:288) at cljs.closure$build.invoke(closure.clj:940) at cljs.closure$build.invoke(closure.clj:909) at user$eval2998.invoke(cljsc.clj:21) at clojure.lang.Compiler.eval(Compiler.java:6619) at clojure.lang.Compiler.load(Compiler.java:7064) at clojure.lang.Compiler.loadFile(Compiler.java:7020) at clojure.main$load_script.invoke(main.clj:294) at clojure.main$script_opt.invoke(main.clj:356) at clojure.main$main.doInvoke(main.clj:440) at clojure.lang.RestFn.invoke(RestFn.java:436) at clojure.lang.Var.invoke(Var.java:423) at clojure.lang.AFn.applyToHelper(AFn.java:167) at clojure.lang.Var.applyTo(Var.java:532) at clojure.main.main(main.java:37) Caused by: clojure.lang.ExceptionInfo: Could not locate cljs/reader__init.class or cljs/reader.clj on classpath: at line 1 /home/jonas/dev/clojure/clojurescript/test/cljs/foo/ns_shadow_test.cljs {:tag :cljs/analysis-error, :file "/home/jonas/dev/clojure/clojurescript/test/cljs/foo/ns_shadow_test.cljs", :line 1, :column 1} at clojure.core$ex_info.invoke(core.clj:4327) at cljs.analyzer$error.invoke(analyzer.clj:267) at cljs.analyzer$analyze_seq.invoke(analyzer.clj:1415) at cljs.analyzer$analyze$fn__1517.invoke(analyzer.clj:1506) at cljs.analyzer$analyze.invoke(analyzer.clj:1499) at cljs.analyzer$analyze.invoke(analyzer.clj:1494) at cljs.analyzer$analyze_file$fn__1534.invoke(analyzer.clj:1575) at cljs.analyzer$analyze_file.invoke(analyzer.clj:1569) at cljs.analyzer$analyze_deps.invoke(analyzer.clj:963) at cljs.analyzer$eval1306$fn__1308.invoke(analyzer.clj:1131) at clojure.lang.MultiFn.invoke(MultiFn.java:241) at cljs.analyzer$analyze_seq.invoke(analyzer.clj:1417) at cljs.analyzer$analyze$fn__1517.invoke(analyzer.clj:1506) at cljs.analyzer$analyze.invoke(analyzer.clj:1499) at cljs.analyzer$analyze.invoke(analyzer.clj:1494) at cljs.compiler$compile_file_STAR_.invoke(compiler.clj:885) at cljs.compiler$compile_file.invoke(compiler.clj:999) ... 20 more Caused by: java.io.FileNotFoundException: Could not locate cljs/reader__init.class or cljs/reader.clj on classpath: at clojure.lang.RT.load(RT.java:443) at clojure.lang.RT.load(RT.java:411) at clojure.core$load$fn__5018.invoke(core.clj:5530) at clojure.core$load.doInvoke(core.clj:5529) at clojure.lang.RestFn.invoke(RestFn.java:408) at clojure.core$load_one.invoke(core.clj:5336) at clojure.core$load_lib$fn__4967.invoke(core.clj:5375) at clojure.core$load_lib.doInvoke(core.clj:5374) at clojure.lang.RestFn.applyTo(RestFn.java:142) at clojure.core$apply.invoke(core.clj:619) at clojure.core$load_libs.doInvoke(core.clj:5413) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.core$apply.invoke(core.clj:619) at clojure.core$require.doInvoke(core.clj:5496) at clojure.lang.RestFn.invoke(RestFn.java:408) at cljs.analyzer$eval1306$fn__1308.invoke(analyzer.clj:1137) at clojure.lang.MultiFn.invoke(MultiFn.java:241) at cljs.analyzer$analyze_seq.invoke(analyzer.clj:1417) ... 34 more

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: