(cp/classpath) not working on W10
Hi,
I just added garden-watcher as a component to my system-map, got everything setup but on system start I get this error message:
(start-dev-system)
Garden: compiling #'de.sveri.estar.styles/main
Wrote: resources/public/css/main.css
Garden: watching
NullPointerException hawk.core/extract-paths-by-type/fn--35330 (core.clj:15)
You can see that it does not watch any files. I debugged into this and in https://github.com/plexus/garden-watcher/blob/7d241e5234a9ec57dee8af03706fd45dc04ac37b/src/garden_watcher/core.clj#L24 it calls the classpath function. On my system this one returns an empty list.
By switching to the system-classpath function I can make it work and the watcher watches the corresponding file.
Garden: stopped watching namespaces.
Garden: watcher not running
Garden: compiling #'de.sveri.estar.styles/main
Wrote: resources/public/css/main.css
Garden: watching C:\Users\sveri\IdeaProjects\clojure\estar\src\clj\de\sveri\estar\styles.clj
=> #<SystemMap>
Garden: compiling #'de.sveri.estar.styles/main
Wrote: resources/public/css/main.css
I experienced a similar issue that turned out to be caused by writing my styles in a .cljc file. garden-watcher converts the namespace to a filename and assumes the .clj extension.
If I had to take a guess this issue is probably caused by bugs in environments and not a bug in garden-watcher. Under default scenarios classpath and system-classpath are basically equivalent, one shouldn't return an empty list and the other work. There are few bugs for Clojure's classloader that can cause classpath to return an empty list, e.g https://dev.clojure.org/jira/browse/CLASSPATH-8?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel