tolitius / mount

managing Clojure and ClojureScript app state since (reset)
Eclipse Public License 1.0
1.22k stars 88 forks source link

Works under self-hosted Clojurescript #85

Closed dm3 closed 6 years ago

dm3 commented 7 years ago

Continuing the #79: Mount now works under self-hosted Clojurescript - tested with Planck and Lumo. The changes were pretty minimal:

I had some problems while trying to make it work, so several functions that didn't depend on state were moved before the state vars. Also the type constructors are now called via the -> constructor functions.

There's one remaining issue with the advanced mode compilation. It complains about mount.tools.macro:

Compiling ClojureScript...
• mount.js
WARNING: Use of undeclared Var mount.tools.macro/defmacro at line 7 src/mount/tools/macro.cljc
WARNING: Use of undeclared Var mount.tools.macro/deftime at line 7 src/mount/tools/macro.cljc
WARNING: Use of undeclared Var mount.tools.macro/& at line 13 src/mount/tools/macro.cljc
WARNING: Use of undeclared Var mount.tools.macro/body at line 13 src/mount/tools/macro.cljc
...

I have limited experience with Clojurescript/advanced mode so any help would be welcome.

arichiardi commented 7 years ago

Will have a look, busy busy now. Thanks for trying the port!

arichiardi commented 7 years ago

@dm3 how did you try :advanced compilation? Using the new lumo compiler?

@tolitius what is your take on this one?

tolitius commented 7 years ago

changes look good. 3 things I am not sure about:

I have not done anything with self hosted ClojureScript yet, and cljs :advanced is not simple by any means, fussy, and takes a lot of handholding. All 3 could have simple answers of course.

arichiardi commented 6 years ago

I have tried to test with tach but datascript is not self-host compatible so it did not work.

About :advanced, I have not idea why is that.

arichiardi commented 6 years ago

@dm3 total wild guess, have you tried to use straight macrovich or to have its macros in a separate namespace?

I don't have an explanation for that but I will actually this next

arichiardi commented 6 years ago

Also I am very confident in saying that you need the :require-macros in mount.tools.macros.

Again, I will try it in my branch and report back.

tolitius commented 6 years ago

thanks for the work on this. it is now composed with #97