bhauman / figwheel-main

Figwheel Main provides tooling for developing ClojureScript applications
https://figwheel.org
Eclipse Public License 1.0
640 stars 93 forks source link

Hot Reloading fails to find jar file if namespace requires JS name munging #182

Open cloojure opened 5 years ago

cloojure commented 5 years ago

Project uses the Tupelo library which has a namespace tupelo.char. This generates a CLJS compile warning:

[Figwheel:WARNING] Compile Warning: Namespace tupelo.char contains a reserved JavaScript keyword, the corresponding Google Closure namespace will be munged to tupelo.char$ target/public/cljs-out/dev/tupelo/char.cljc line:7 column:1

but otherwise runs fine. Worked fine with original Figwheel, including hot reloading.

With Figwheel.Main, it works fine upon compile & load (after rm -rf target). However, upon an edit/save, hot reloading fails with error:

Compile Exception 
java.lang.IllegalArgumentException: Not a file: jar:file:/Users/r634165/.m2/repository/tupelo/tupelo/0.9.137/tupelo-0.9.137.jar!/tupelo/char.cljc

Relevant contents of ./target:

> d target/**/*char*
-rw-r--r--  1 r634165  RBSWA\Domain Users   3519 May  7 18:11 target/public/cljs-out/dev/tupelo/char.cljc
-rw-r--r--  1 r634165  RBSWA\Domain Users  13859 May  7 18:11 target/public/cljs-out/dev/tupelo/char.cljc.cache.json
-rw-r--r--  1 r634165  RBSWA\Domain Users   7252 May  7 18:11 target/public/cljs-out/dev/tupelo/char.js
-rw-r--r--  1 r634165  RBSWA\Domain Users   4155 May  7 18:30 target/public/cljs-out/dev/tupelo/char.js.map
cloojure commented 5 years ago

Relevant contents of ~/.m2:

> d ~/.m2/**/tupelo*
drwxr-xr-x  4 r634165  RBSWA\Domain Users     128 May  7 18:11 /Users/r634165/.m2/repository/tupelo/
drwxr-xr-x  3 r634165  RBSWA\Domain Users      96 Mar 22 15:42 /Users/r634165/.m2/repository/tupelo/core/tupelo.core/
drwxr-xr-x  3 r634165  RBSWA\Domain Users      96 May  7 18:11 /Users/r634165/.m2/repository/tupelo/tupelo/
-rw-r--r--  1 r634165  RBSWA\Domain Users  491871 May  7 18:11 /Users/r634165/.m2/repository/tupelo/tupelo/0.9.137/tupelo-0.9.137.jar
-rw-r--r--  1 r634165  RBSWA\Domain Users      40 May  7 18:11 /Users/r634165/.m2/repository/tupelo/tupelo/0.9.137/tupelo-0.9.137.jar.sha1
-rw-r--r--  1 r634165  RBSWA\Domain Users    7360 May  7 18:11 /Users/r634165/.m2/repository/tupelo/tupelo/0.9.137/tupelo-0.9.137.pom
-rw-r--r--  1 r634165  RBSWA\Domain Users      40 May  7 18:11 /Users/r634165/.m2/repository/tupelo/tupelo/0.9.137/tupelo-0.9.137.pom.sha1