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

(cp/classpath) not working on W10 #3

Open
sveri opened this issue Apr 15, 2018 · 1 comment
Open

(cp/classpath) not working on W10 #3

sveri opened this issue Apr 15, 2018 · 1 comment

Comments

@sveri
Copy link

sveri commented Apr 15, 2018

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
k2052 added a commit to k2052/garden-watcher that referenced this issue May 14, 2018
@k2052
Copy link

k2052 commented May 14, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants