Welcome! Please see the About page for a little more info on how this works.

0 votes
in ClojureScript by

Compiling with Leiningen & cljsbuild, using ClojureScript 1.10.891, on Windows, the compilation failed with following exception.

This does not occur with the same project & source files and previous ClojureScript versions (e.g. 1.10.879), on the same environment (i.e. Windows).

This appears to me to be related to the recent change in function analyze-goog-file and the conversion of resources to file-paths (on Windows).

Exception:
clojure.lang.ExceptionInfo: failed compiling file:target\cljsbuild-compiler-1\cljs\core.cljs {:file #object[java.io.File 0x57ac2910 "target\\cljsbuild-compiler-1\\cljs\\core.cljs"], :clojure.error/phase :compilation}

    at cljs.compiler$compile_file$fn__4031.invoke(compiler.cljc:1765)
    at cljs.compiler$compile_file.invokeStatic(compiler.cljc:1725)
    at cljs.compiler$compile_file.invoke(compiler.cljc:1701)
    at cljs.closure$compile_file.invokeStatic(closure.clj:660)
    at cljs.closure$compile_file.invoke(closure.clj:638)
    at cljs.closure$fn__5527.invokeStatic(closure.clj:734)
    at cljs.closure$fn__5527.invoke(closure.clj:728)
    at cljs.closure$fn__5440$G__5433__5447.invoke(closure.clj:556)
    at cljs.closure$compile_from_jar.invokeStatic(closure.clj:707)
    at cljs.closure$compile_from_jar.invoke(closure.clj:697)
    at cljs.closure$fn__5531.invokeStatic(closure.clj:744)
    at cljs.closure$fn__5531.invoke(closure.clj:728)
    at cljs.closure$fn__5440$G__5433__5447.invoke(closure.clj:556)
    at cljs.closure$compile_sources$iter__5653__5657$fn__5658.invoke(closure.clj:1105)
    at clojure.lang.LazySeq.sval(LazySeq.java:42)
    at clojure.lang.LazySeq.seq(LazySeq.java:51)
    at clojure.lang.RT.seq(RT.java:535)
    at clojure.core$seq__5419.invokeStatic(core.clj:139)
    at clojure.core$dorun.invokeStatic(core.clj:3121)
    at clojure.core$doall.invokeStatic(core.clj:3136)
    at clojure.core$doall.invoke(core.clj:3136)
    at cljs.closure$compile_sources.invokeStatic(closure.clj:1101)
    at cljs.closure$compile_sources.invoke(closure.clj:1090)
    at cljs.closure$build.invokeStatic(closure.clj:3195)
    at cljs.closure$build.invoke(closure.clj:3099)
    at cljs.build.api$build.invokeStatic(api.clj:231)
    at cljs.build.api$build.invoke(api.clj:212)
    at cljs.build.api$build.invokeStatic(api.clj:218)
    at cljs.build.api$build.invoke(api.clj:212)
    at cljsbuild.compiler$compile_cljs$fn__709.invoke(compiler.clj:61)
    at cljsbuild.compiler$compile_cljs.invokeStatic(compiler.clj:60)
    at cljsbuild.compiler$compile_cljs.invoke(compiler.clj:48)
    at cljsbuild.compiler$run_compiler.invokeStatic(compiler.clj:168)
    at cljsbuild.compiler$run_compiler.invoke(compiler.clj:129)
    at user$eval838$iter__886__890$fn__891$fn__917.invoke(form-init2485741331243889614.clj:1)
    at user$eval838$iter__886__890$fn__891.invoke(form-init2485741331243889614.clj:1)
    at clojure.lang.LazySeq.sval(LazySeq.java:42)
    at clojure.lang.LazySeq.seq(LazySeq.java:51)
    at clojure.lang.RT.seq(RT.java:535)
    at clojure.core$seq__5419.invokeStatic(core.clj:139)
    at clojure.core$dorun.invokeStatic(core.clj:3121)
    at clojure.core$doall.invokeStatic(core.clj:3136)
    at clojure.core$doall.invoke(core.clj:3136)
    at user$eval838.invokeStatic(form-init2485741331243889614.clj:1)
    at user$eval838.invoke(form-init2485741331243889614.clj:1)
    at clojure.lang.Compiler.eval(Compiler.java:7181)
    at clojure.lang.Compiler.eval(Compiler.java:7171)
    at clojure.lang.Compiler.load(Compiler.java:7640)
    at clojure.lang.Compiler.loadFile(Compiler.java:7578)
    at clojure.main$load_script.invokeStatic(main.clj:475)
    at clojure.main$init_opt.invokeStatic(main.clj:477)
    at clojure.main$init_opt.invoke(main.clj:477)
    at clojure.main$initialize.invokeStatic(main.clj:508)
    at clojure.main$null_opt.invokeStatic(main.clj:542)
    at clojure.main$null_opt.invoke(main.clj:539)
    at clojure.main$main.invokeStatic(main.clj:664)
    at clojure.main$main.doInvoke(main.clj:616)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.lang.Var.applyTo(Var.java:705)
    at clojure.main.main(main.java:40)

Caused by: clojure.lang.ExceptionInfo: null #:clojure.error{:source nil, :line nil, :column nil, :phase :compilation}

    at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:4269)
    at cljs.analyzer$analyze.invoke(analyzer.cljc:4255)
    at cljs.analyzer$analyze_file$fn__3008.invoke(analyzer.cljc:4773)
    at cljs.analyzer$analyze_file.invokeStatic(analyzer.cljc:4768)
    at cljs.analyzer$analyze_file.invoke(analyzer.cljc:4726)
    at cljs.analyzer$analyze_file.invokeStatic(analyzer.cljc:4740)
    at cljs.analyzer$analyze_file.invoke(analyzer.cljc:4726)
    at cljs.compiler$with_core_cljs.invokeStatic(compiler.cljc:1473)
    at cljs.compiler$with_core_cljs.invoke(compiler.cljc:1463)
    at cljs.compiler$compile_file_STAR_.invokeStatic(compiler.cljc:1652)
    at cljs.compiler$compile_file_STAR_.invoke(compiler.cljc:1645)
    at cljs.compiler$compile_file$fn__4031.invoke(compiler.cljc:1750)
    ... 59 more

Caused by: clojure.lang.ExceptionInfo: Illegal char <:> at index 4: file:\C:\Users\n.m2\repository\org\clojure\google-closure-library\0.0-20210811-6da97fe1\google-closure-library-0.0-20210811-6da97fe1.jar!\goog\math\long.js in file file:/C:/Users/n/.m2/repository/org/clojure/clojurescript/1.10.891/clojurescript-1.10.891.jar!/cljs/core.cljs {:tag :cljs/analysis-error}

    at cljs.analyzer$error.invokeStatic(analyzer.cljc:719)
    at cljs.analyzer$error.invoke(analyzer.cljc:715)
    ... 71 more

Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 4: file:\C:\Users\n.m2\repository\org\clojure\google-closure-library\0.0-20210811-6da97fe1\google-closure-library-0.0-20210811-6da97fe1.jar!\goog\math\long.js

    at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
    at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
    at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
    at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
    at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
    at java.io.File.toPath(File.java:2271)
    at cljs.externs$resource__GT_source_file.invokeStatic(externs.clj:293)
    at cljs.externs$resource__GT_source_file.invoke(externs.clj:290)
    at cljs.externs$analyze_goog_file.invokeStatic(externs.clj:307)
    at cljs.externs$analyze_goog_file.invoke(externs.clj:297)
    at cljs.analyzer$analyze_deps.invokeStatic(analyzer.cljc:2640)
    at cljs.analyzer$analyze_deps.invoke(analyzer.cljc:2612)
    at cljs.analyzer$ns_side_effects.invokeStatic(analyzer.cljc:4131)
    at cljs.analyzer$ns_side_effects.invoke(analyzer.cljc:4126)
    at cljs.analyzer$analyze_STAR_$fn__2886.invoke(analyzer.cljc:4253)
    at clojure.lang.PersistentVector.reduce(PersistentVector.java:343)
    at clojure.core$reduce.invokeStatic(core.clj:6829)
    at clojure.core$reduce.invoke(core.clj:6812)
    at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:4253)
    at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:4244)
    at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:4272)
    ... 70 more

1 Answer

0 votes
by

Thanks for the report - fixed here https://github.com/clojure/clojurescript/commit/79aef5056e6e45bcc21bdd5fd2075979a5ca33ac along w/ the addition of a Windows test runner to avoid simple problems like this.

...