cgrand / enlive

a selector-based (à la CSS) templating and transformation system for Clojure
http://wiki.github.com/cgrand/enlive
1.62k stars 152 forks source link

Enlive template reloading seems not to work on Windows #92

Closed sveri closed 9 years ago

sveri commented 10 years ago

Hi, like the title says I cannot get enlive template reloading running. I provided a small example here: https://github.com/sveri/enlive_http_kit

I created that project with luminus: lein new luminus projectname +http-kit and run it with lein run -dev.

The relevant files are base.html and home.clj

jdf-id-au commented 9 years ago

I was unable to get it working on the Mac either, and unfortunately couldn't get akolov's solution working either (doubtless because of my own lack of skill). He describes the nature of the underlying Mac problem.

skprasadu commented 9 years ago

This issue was impacting https://github.com/plexus/chestnut lein template.

The issue has been fixed, I tested it and it works. For slightly adventurous and impatient souls, get the latest enlive code in your machine and "lein install" it.. it is still not in clojars. The code snipped that fixed this is in src/net/cgrand/reload.clj as below.

(defmethod watch-url "file" [^java.net.URL url ns]
  (let [path (java.nio.file.Paths/get (.toURI url))
        ws (watch-service ns)]
   (ws path)))
plexus commented 9 years ago

@cgrand would you consider a new release of Enlive? If I'm not mistaken the current one is over a year old, and seems a number of fixes have gone in since then.

conan commented 9 years ago

I've had success checking out and lein installing enlive to fix this issue, as it prevents chestnut project REPLs from working on windows. A Clojars release would be much appreciated.

vojd commented 9 years ago

:+1: on a new Enlive release. Having the same issue on Windows.

acron0 commented 9 years ago

+1 on a new Enlive release to fix this. Thanks!

fdserr commented 9 years ago

Fixed, clojars incoming. Thankies!