BirdseyeSoftware / lein-dalap

Leiningen plugin to transform Clojure modules -> Clojurescript, without having to fork your codebase!
http://birdseye-sw.com/oss/lein-dalap/
MIT License
48 stars 3 forks source link

Leiningen hook does not work with `lein trampoline cljsbuild auto`? #1

Open guns opened 10 years ago

guns commented 10 years ago

The documentation states:

you can automatically run lein-dalap when you are running cljsbuild auto or once command, just by adding a :hooks to your project.clj file

Unfortunately, adding :hooks [leiningen.dalap] only seems to trigger lein-dalap once on start when running cljsbuild auto. Subsequent file changes trigger cljsbuild without dalap transformations.

Am I doing something wrong? It would be quite nice to avoid running yet another JVM for a lein plugin.

Thank you very much for lein-dalap; Clojure by default is really the sanest way to do a multi-platform preprocessor.

tavisrudd commented 10 years ago

@guns sorry for the delayed response - had notifications turned off. What version of cljsbuild is this with? It should be re-running each time auto detects change.

guns commented 10 years ago

What version of cljsbuild is this with?

lein-cljsbuild 1.0.0.

https://github.com/clojure/tools.cli/blob/master/project.clj

I just re-tried running cljsbuild auto without a trampoline and it works beautifully! I typically run lein processes in a trampoline, so it seems I never attempted running without one.

So perhaps this is not a bug, but then I don't think I understand why running in a trampoline causes this problem…

tavisrudd commented 10 years ago

Hmm, I've never tried it with trampoline. Does lein trampoline cljsbuild auto work with normal cljs file?

guns commented 10 years ago

Yes, lein trampoline cljsbuild auto works when just auto-compiling a cljs file.