Closed chrisbetz closed 7 years ago
BTW: lein version -> Leiningen 2.6.1 on Java 1.8.0_66 Java HotSpot(TM) 64-Bit Server VM
Thank you for the detailed description and for the example repo. Much appreciated 👍
I was able to reproduce your results. It seems that the build process is started (there is a Compiling ClojureScript...
line in the output), but is terminated before producing a result. But that is just a first guess. I would need to do some further digging into how lein-monolith works.
:) If you need any further help, info, anything, just let me know.
BTW: My guess is the "location" of the source folder is not found - as the build process is started, but doesn't really compile a thing. However, if started from the sub-project dir, everything is in place as cljsbuild expects it. Just my two cents.
Yes, you are right 👍 It looks for the source files in the directory where the build command was executed in, so for your example it looks in lein-monolith/example
instead of lein-monolith/example/apps/app-b
. (https://github.com/emezeske/lein-cljsbuild/blob/1.1.6/support/src/cljsbuild/compiler.clj#L139)
Seems like Leiningen passes a :root
property in the project description, e.g. :root ~/Projects/lein-monolith/example/apps/app-b
, which I can hopefully use for fixing this.
@chrisbetz Just pushed a first version of the fix to master and deployed it as 1.1.7-SNAPSHOT
. cljsbuild
finds the files now and builds the project, but outputs the result to the current working directory, so still need to fix this part 😉
@mneise That's gorgeous. I'm happy to hear you found a possibility to fix things. Really looking forward. We're in the middle of a new release of our software, so I won't be able to check today or next monday, but I will try to look into 1.1.7-SNAPSHOT on tuesday to see if I can provide you with feedback on things (if you like). Really, really appreciating your work :) Thanx!
@chrisbetz I found a better fix for this.
Cljsbuild creates a new subprocess to run the compiler and the working directory for the subprocess wasn't set correctly, since cljsbuild didn't include the :root
key in the project map. It should find the files now and also output the result to the right place.
Let me know if you run into any more problems 😉
@mneise Hi Maria, which version contains your latest fix for this?
@thron7 You can try it out using 1.1.7-SNAPSHOT
.
Hi,
we're trying to use lein-monolith for building our Clojure/ClojureScript application. Unfortunately, lein-monolith does clash with lein-cljsbuild.
You can see this using the example repo from our fork.
Running
from project root (monolith-path) is compiling clojurescript, but does not produce a result (as you can see in the output: there is no line like this
Compiling "js/compiled/app.js" from ["src/cljs"]...
. (see below for full output).Same is true if we're using hooks to run cljs compiler on regular leiningen tasks.
I also opened an issue on the lein-monolith repo, but I'm just not sure where the problem is located.
I would be very grateful for any hints on this. :)
Build from monolith project
Build from sub-project
(not what I was trying to achieve, just for showing the actual correctness of our configuration)