robfletcher / gradle-compass

A SASS / Compass plugin for Gradle
Apache License 2.0
59 stars 39 forks source link

compassWatch failing to detect file changes. #43

Open aya-eiya opened 9 years ago

aya-eiya commented 9 years ago

I found that there is some problems in the compass watch command with jruby-complete.jar since 1.7.14.

My env is Win7 x64, jvm version "1.8.0_40".

First I met the problem that fail to detect changes for '.scss' files in this plugin's task compassWatch.

At the time of running the task, it compiles scss files to css files, but it do nothing on these scss files is changed.

So I check compass watch command with jruby-complete-1.7.19.jar like this

java -jar jruby-complete-1.7.19.jar build\tmp\jrubyExec-compass\bin\compass watch --css-dir=grails-app\assets\stylesheets\develop\css --sass-dir=grails-app\assets\stylesheets\scss

then it did not work properly, as same as compassWatch task did not.

So I check the versions of 'jruby-complete' [1.7.2,1.7.10,1.7.13,1.7.14,1.7.15,1.7.17,1.7.18,9.0.0.0.pre1].

The results for compass watch works properly is the following.

version it works properly
1.7.2 OK
1.7.10 OK
1.7.13 OK
1.7.14 NG
1.7.15 NG
1.7.17 NG
1.7.18 NG
9.0.0.0.pre1 NG

So I tried to use the version 'org.jruby:jruby-complete:1.7.13' but that did not work with runtime error.

:web:compassWatchLoadError on line ["1071"] of org/jruby/RubyKernel.java: no such file to load -- jruby-complete
Run with --trace to see the full backtrace

I think this issue is not for your plugin but for jruby or gradle-jruby plugin.

This is just a note for someone who will see the same problem.

aya-eiya commented 9 years ago

I found the cause for this problem.

There is some difference in some path name handling methods between the incorrect behaving versions of jRuby on Windows and cRuby (or other jRuby with other OS). And Compass and Sass handling the file paths as plain string so that the difference is actually occurring the problem - can't detect any modifying.

I'll look if I could correct this cause of jRuby by setting JVM System Args to some gradle task.

jordanjennings commented 9 years ago

@aya-eiya Did you figure out a workaround? I'm on Windows and the compassWatch doesn't seem to do anything, sounds like maybe it's the same issue.