-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't init clojurescript in clojure-only project #3
Comments
Thanks for your pointing out this error. This problem will be solved in the next version of debux. My solution is simple. The following part of debux/project.clj
will be changed to the following.
That is, the default cversion of clojure and clojurescript will be provided by debux, not you. So you don't need to include clojurescript dependency in your |
Wouldn't be better to require clojure script related namespaces with reader macro? So that we don't bring unnecessary deps in classpath?
|
In my knowledge and practice, your suggestion doesn't work, because the macro expansions in ClojureScript are carried out before compile time by Clojure, not by ClojureScript. So every code executed during macro-expansion time has to be located in At first, I thought which code should be changed to meet your requirement. After long review, I conclude that the shared codes between Clojure and ClojureScript has to be dupicated too much to meet your requirement and it is not desirable. So I decided to discard code rewriting and change the If I am wrong, please let me know about it. |
Now |
I've also just looked into this issue, because the load time of debux is quite substantial (~1s on a beefy 8core i9). My suspicion is that it's caused by the requirement to load the cljs analyser. To get rid of ClojureScript dependency, the cleanest way would be to fork the library and remove any cljs related code. This of course introduces extra maintenance burden, but given how little this library changes lately; it might worth the effort. What do you think @philoskim ? Am I missing something, or it worth giving it a try to gut cljs from it? |
I measured the load time of debux in the Clojure REPL several times like this.
The results are as follows.
The CPU of my notebook is the Intel i7-6500U dual cores. I think that the load time is relatively small, compared to the entire development time. Sorry to say that. |
I have a plain clojure project (no clojurescript), when I use debux and require core namespace in REPL i get exception
Probably this caused by init of
[cljs.analyzer.api :as ana]
which is not in classpath.Is there a way to disable clojurescript and make it work for clojure only?
P.S. Adding clojurescript deps looks like short term fix, but would be good to avoid unnecessary deps
The text was updated successfully, but these errors were encountered: