Open kylecordes opened 10 years ago
It's works, thanks.
(It would also be very nice to have this bug fixed.)
Someone needs to do the work to determine that is a problem when using ClojureScript directly. If it is an issue, ticket & patch in JIRA welcome.
I was able to fix this by updating to clojurescript "0.0-2665".
@kylecordes can you confirm that this problem doesn't exist when using CLJS 2665?
I will attempt to confirm this.
Unfortunately, I still see the same problem, with [org.clojure/clojurescript "0.0-2665"]. If the main output JS does not need to be built, the dependency files (goog*), are not generated if they are missing. I would guess this means that the compiler only looks at the main output file, not the whole tree of output files, to determine if it needs to build.
@kylecordes did you try with ClojureScript master? I landed a related fix a little while back - this might actually be the same issue.
I did not try it with latest master yet; I have done that in the past and need to dig up how to do it.
@kylecordes, checkout master, ./script/build
, note version installed into local .m2, update your project.clj
CLJS Commit faf6d3849e74b7f2408916a918fcc8ed43f085ac, build 2692.
I get the same result as before. If the main output JavaScript file does not need rebuild, none of the contents of the :output-dir get any attention at all. I can delete that whole directory or any subset of its contents, and performing a rebuild of the ClojureScript does not replace any missing files.
This may not be worthy of attention or fix; fixing it would require that the compiler determine the whole set of output files and understand how depend on the ClojureScript input files. Certainly it would be most tidy and most on par with mature compilers for other languages if it understood the whole dependency relationship set, but it is possible that this is not worth the computational cost of a slower no-change "compile".
@kylecordes oh sorry I misunderstood. Yeah that issue has nothing to do with ClojureScript, cljsbuild does it's own calculation of when a rebuild should occur.
Very good, in the sense it means there is not a problem with ClojureScript...
It appears that cljsbuild (or maybe cljs underneath it?) doesn't bother to emit the goog/* tree of files, if the main JS file does not need to be built. This causes considerable frustration as nothing complains about an error until the browser can't load any goog/* files. I've found it necessary to do this:
rm resources/public/*.js
as part of building, to ensure it actually works.
Help?