-
Notifications
You must be signed in to change notification settings - Fork 85
Upgrade to ClojureScript 1.10 w/o Google Closure Compiler #379
Conversation
Unfortunately the commit google/closure-compiler@c668ed7 break us big time because it seems it does not emit Bigger time than the JVM implemenation because we don't have access to classes and therefore we cannot hack our own solution. I don't still grasp all the implications but is seems that lumo/src/cljs/bundled/lumo/closure.cljs Line 1454 in 781b5d2
|
Juho pushed another nice fix there: clojure/clojurescript@b1de2f8 Keeping track here just for the sake of it, at the moment these methods are not exposed to the JS compiler. |
After a night's sleep I think the possible approaches to this are three:
|
I am trying things at the REPL and what stopped working is the following: (def compiledCode "var ...")
(closure/parse-js-ns (.split compiledCode #"(?=goog\.provide\(\")")) which happens here: |
149c45c
to
d6bc1d5
Compare
Something I discovered today on this branch is this:
|
New GCC version is out finally solving our long standing source map bug! I will integrate it here. Wondering if after merging this we should make an alpha release. I am currently using the two outstanding patches merged together into one on node with no issues. |
a2d7623
to
ec02005
Compare
Rebased on master in order to have the |
This PR is stuck because of the compiler issue, still haven't found a way to pass post GCC module processing around. Vanilla Cljs queries the Google Closure Compiler, we can't (see above). |
Got some debugging of what happens in
no more |
After more investigating, it seems like the options we need have not been exposed to the JS version of the compiler. Unless someone does it they won't add them there because the GWT has been contributed and seems not really updated. In particular one thing that is evident from the above is that we need This would not solve the problem though of identifying the modules in the GCC-ed file. It seems like a combination of |
c408d4c
to
c83ab9a
Compare
8059eaf
to
f0a5f91
Compare
ba75e0e
to
9f91a75
Compare
Uncommented |
@@ -11,7 +11,7 @@ echo "### Compiling Macro Namespaces" | |||
|
|||
mkdir lumo-cljs\out\macros-tmp || goto :error | |||
|
|||
echo (require 'lumo.build.api 'lumo.analyzer 'lumo.cljs-deps 'lumo.classpath 'lumo.closure 'lumo.compiler 'lumo.io 'lumo.json 'lumo.util 'clojure.core.reducers 'clojure.zip 'clojure.data 'clojure.reflect 'clojure.browser.net 'clojure.browser.event 'cljs.nodejs 'cljs.pprint 'cljs.test 'cljs.analyzer.api 'cljs.spec.test.alpha) (require-macros 'lumo.repl 'lumo.util 'clojure.template 'cljs.pprint 'cljs.support 'cljs.spec.alpha 'cljs.spec.gen.alpha 'cljs.spec.test.alpha 'cljs.test 'cljs.reader 'cljs.env.macros 'cljs.analyzer.macros 'cljs.compiler.macros) | build\lumo.exe --quiet -c target -sfdk lumo-cljs/out/macros-tmp || goto :error | |||
echo (require 'lumo.build.api 'lumo.analyzer 'lumo.cljs-deps 'lumo.classpath 'lumo.closure 'lumo.compiler 'lumo.io 'lumo.json 'lumo.util 'clojure.core.reducers 'clojure.zip 'clojure.data 'clojure.reflect 'clojure.browser.net 'clojure.browser.event 'cljs.nodejs 'cljs.pprint 'cljs.test 'cljs.analyzer.api 'cljs.spec.test.alpha 'cljs.core.specs.alpha) (require-macros 'lumo.repl 'lumo.util 'clojure.template 'cljs.pprint 'cljs.support 'cljs.spec.alpha 'cljs.spec.gen.alpha 'cljs.spec.test.alpha 'cljs.test 'cljs.reader 'cljs.env.macros 'cljs.analyzer.macros 'cljs.compiler.macros) | build\lumo.exe --quiet -c target -sfdk lumo-cljs/out/macros-tmp || goto :error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing moving the generated files for cljs.core.specs.alpha
to the target
dir
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I thought I added those, will add them again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adressed.
@@ -8,4 +9,36 @@ | |||
(when-not (cljs.test/successful? m) | |||
(lumo/exit 1))) | |||
|
|||
(defmethod cljs.test/report [:cljs.test/default :error] [m] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does adding the code below help you debug what's going on in tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep this is a better reporter basically, using this at work too, can take it away and add it in another PR as well if you want
Port code over and some tests for 1.10 support. Note that the Google Closure Compiler has not been bumped because some changes are not compatible.
The new CLJS introduces changes that disable newline printing for lumo (and planck), so we need to patch it. See planck-repl/planck#3445dd7.
Apparently cljs/core.cljs.cache.json has been moved in the jar (and on the fileset) and for this reason tests were failing.
waiting on clojure/clojurescript@8bc9b985 to be released
For now this is what has been done:
cljs.core/eval
in lumo.core