lynaghk / cljx

Write a portable codebase targeting Clojure/ClojureScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

if in cljs repl, will have to 'lein cljsbuild clean' before 'lein cljx once'

ccfontes opened this issue · comments

When running lein repl followed by Austin, will have to lein cljsbuild clean before lein cljx once to be able to have new code changes available in the cljs repl.

Is this an expected behavior?

If a .cljs resource is available for a given namespace, then it will be given preference over a .cljx resource. So, yes, this is expected behaviour. Maybe it shouldn't be (I can imagine the opposite arrangement, but I was attempting to be conservative?), but that's how it is now. Perhaps your apparently having the opposite expectation is an indication that changing things might be reasonable…

Forget about the specific order of commands I said before. I cannot reproduce the issue like that anymore.
Regarding an exception I have related to meta that is present in the ns declaration (but removed from the .cljs resource), what I notice is, regardless if I do lein cljx once or not, it will always yield that exception, so it seems it will always use the .cljx resource somehow. When I remove the meta from the cljx resource, it works, of course.

The project with this issue
The stack trace

Trimming the scope of 0.5.0 so as to cut a release addressing pressing issues. Will circle back later.