This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-10-29
Channels
- # aws (1)
- # beginners (65)
- # boot (400)
- # cider (19)
- # clara (2)
- # cljs-dev (29)
- # clojure (127)
- # clojure-chicago (2)
- # clojure-conj (1)
- # clojure-dev (12)
- # clojure-russia (156)
- # clojure-sg (6)
- # clojure-za (1)
- # clojurescript (193)
- # core-async (23)
- # datomic (91)
- # editors (4)
- # editors-rus (1)
- # events (1)
- # hoplon (3)
- # jobs (1)
- # ldnclj (6)
- # leiningen (3)
- # nginx (3)
- # off-topic (5)
- # om (93)
- # onyx (10)
- # re-frame (11)
- # spacemacs (1)
- # testing (2)
- # yada (5)
Hmh, managed to fix the problem with recompile-dependents on cljs-1437 but now I found another problem
Analyzer locate-src presumes there is single source root: https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L1640 and this means that it can't find some namespaces which are only available in the input directories and not classpath
@juhoteperi is classpath case covered by cljs.util/ns->source
?
A namespace which on input directories but not on classpath
Like (inputs "src" "src2")
where classpath only includes src
Is it problem if we break backwards compatibility now? Because I'm currently not setting (:root <@U095WMJNR>/*compiler*)
to anything
Well, it would be easy to set it when build
is only passed a file/dir/url etc. but when passed a cljs.build.api/inputs
or other it won't be possible to set it to meaningful value
The problem can be reproduced with https://github.com/mneise/cljs-1437-test and by running touch src/cljs_1437_test/core.cljs && ./scripts/build
Core.cljs depends on namespace foo2 from a directory which is not on classpath and because locate-src doesn't work analysis cache for foo2 won't be loaded
@juhoteperi: I just don’t understand the issue, is there something about your patch that makes it not possible to support this anymore?
@dnolen: Yes. There is no longer a single root directory.
Before the patch compile-root
was called per input directory, like (inputs "src" "src2")
called (compile-root "src")
and (compile-root "src2")
so (:root <@U095WMJNR>/*compiler*)
was set to one directory at a time. Now that all files are compiled on one pass instead of per directory it's not possible to set the (:root <@U095WMJNR>/*compiler*)
to a single directory.
If we want to support this case, I have some ideas how to implement locate-src
so that it can search for sources in given input directories