Skip to content
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

Trivial change in CLJC file causes recompile of all CLJS files #457

Open
mtruyens opened this issue Jan 19, 2017 · 0 comments
Open

Trivial change in CLJC file causes recompile of all CLJS files #457

mtruyens opened this issue Jan 19, 2017 · 0 comments

Comments

@mtruyens
Copy link

mtruyens commented Jan 19, 2017

In a fairly large project I am working on, I have a separate source folder with .CLJC-files that are shared between the frontend (Clojurescript) and backend (Clojure).

I noticed that making a trivial change in a CLJC file (e.g., adding a blankline) causes all or most of the CLJC + Clojurescript files to be rebuilt. (See my question on http://stackoverflow.com/questions/41729871/changing-one-cljc-file-causes-full-recompile)

After further investigation, it appears that this problem is not caused by the specifics of my project, but is instead the way lein-cljsbuild intends to operate, to err on the side of safety. (see also #345)

Even so, the end result is almost unworkable for me, because trivial changes to CLJC-files cause 45-second builds.

Wouldn't it be a good idea to add an option where the user can specify which (sub)folders in the source code contain "safe" CLJC files? Or, alternatively, an option to treat changes to CLJC-files as changes to CLJS-files (= only recompiles of directly impacted CLJS files), instead of changes to CLJ files (= fully codebase recompiles)?

Figwheel uses a similar configuration option:

:reload-clj-files {:clj true :cljc false}

@mneise mneise added this to the 1.1.7 milestone Jul 30, 2017
@mneise mneise modified the milestones: 1.1.8, 1.1.7 Jul 30, 2017
@mneise mneise removed this from the 1.1.8 milestone Apr 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants