-
Notifications
You must be signed in to change notification settings - Fork 151
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
lein uberjar
doesn't remove prior version of compiled JS, shipping dev code
#414
Comments
This issue was resolved for me by the steps detailed in #366 (comment) |
I lied. Cljsbuild still doesn't overwrite existing compiled js during an uberjar build. |
Taking a look at this now 😉 |
Not able to reproduce this yet. Could you maybe provide a minimal repository to reproduce this issue? |
So, after a bit of work, my running hypothesis is that Cljsbuild won't try to re-compile js if it finds the existing file, in this case I can work on putting together a minimal test case to further drill in on this, but by looking at the actual files that my uberjar contained as I tweaked various aspects of the build system the only thing that caused files to be included in the uberjar was nuking the entirety of the resources/public/js folder, and critically that file. |
@venantius Did you find any solution to this issue? Indeed, removing "resources/public/js/app.js" does the trick. However, this is not an elegant solution at all. |
@psalaberria002 The other thing I found that helped was adding the build path to leiningen's |
The reason it doesn't recompile is that lein-cljsbuild only recompiles if the sources have been modified since the last build. I'm currently not aware of another solution, other than running I think for 2.0 I will probably remove this behaviour, since ClojureScript itself is pretty good when it comes to incremental builds. |
That's interesting. I think using the plugin to force cleaning of the compilation target directory prior to uberjar compilation is probably the desirable / "expected" behavior here. |
Anyways, happy that we've been able to nail this down as something warranting investigation rather than a "can't-reproduce" ^.^ |
I have the same problem. If I change my |
I'm relatively new to Cljs, but not to Clojure, and this behavior has been confusing to me. I have a project.clj as follows:
If I've been running figwheel for a while in development, but I stop and then run
lein uberjar
, my ClojureScript code is not re-compiled for the different uberjar profile, meaning my uberjar now ships with application code that tries to open a figwheel connection.If I manually delete
/resources/public/js/app.js
and trigger a re-compile by runninglein with-profile uberjar cljs build once
, then runlein uberjar
, the jar file has the correct javascript file (no figwheel connection attempted).The text was updated successfully, but these errors were encountered: