jahaziel17 / wro4j

Automatically exported from code.google.com/p/wro4j
0 stars 0 forks source link

Sass 3.2.0 syntax not working in rubySassCss from 1.7.5 #881

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
1. I have this simple .scss file:
@mixin mix($arg...) {
  font-size: 12px;
}

.class {
  color: black;
}
2. When I run it through rubySassCss I get this error:
2014-06-13 11:13:48,574 DEBUG [ro.isdc.wro.http.WroFilter] Exception occured
ro.isdc.wro.WroRuntimeException: org.jruby.embed.EvalFailedException: 
(SyntaxError) Invalid CSS after "@mixin mix($arg": expected ")", was "...) {"
        at ro.isdc.wro.extensions.processor.support.sass.RubySassEngine.process(RubySassEngine.java:70)
        at ro.isdc.wro.extensions.processor.css.RubySassCssProcessor.process(RubySassCssProcessor.java:59)
        at ro.isdc.wro.model.resource.processor.decorator.ProcessorDecorator.process(ProcessorDecorator.java:89)
        at ro.isdc.wro.model.resource.processor.decorator.LazyProcessorDecorator.process(LazyProcessorDecorator.java:49)
        at ro.isdc.wro.model.resource.processor.decorator.ProcessorDecorator.process(ProcessorDecorator.java:89)
        at ro.isdc.wro.model.resource.processor.decorator.ProcessorDecorator.process(ProcessorDecorator.java:89)

This means that the processor doesn't accept the variable arguments syntax that 
was introduced in Sass in version 3.2.0 
(http://sass-lang.com/documentation/file.SASS_CHANGELOG.html). To confirm 
file's validity I even run it through a standalone Sass 3.2.1 processor, which 
produced a .css file without errors.

wro4j release notes (https://code.google.com/p/wro4j/wiki/ReleaseNotes) state 
that rubySassCss processor was upgraded to 3.2.1 in version 1.5.0. This should 
make a variable arguments syntax valid in the wro4j's 1.7.5 version I'm using. 

Here's also my application pom.xml:

<dependency>
  <groupId>ro.isdc.wro4j</groupId>
  <artifactId>wro4j-core</artifactId>
  <version>1.7.5</version>
</dependency>
<dependency>
  <groupId>ro.isdc.wro4j</groupId>
  <artifactId>wro4j-extensions</artifactId>
  <version>1.7.5</version>
</dependency>

Original issue reported on code.google.com by rj.kuszn...@gmail.com on 13 Jun 2014 at 9:50

GoogleCodeExporter commented 8 years ago

Original comment by alex.obj...@gmail.com on 13 Jun 2014 at 10:03

GoogleCodeExporter commented 8 years ago

Original comment by alex.obj...@gmail.com on 13 Jun 2014 at 10:03

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
After a day of work I finally managed to solve it. I just needed to force 
sass-gems to 3.2.1 version by adding this to my pom.xml:

<dependency>
  <groupId>me.n4u.sass</groupId>
  <artifactId>sass-gems</artifactId>
  <version>3.2.1</version>
</dependency>

Still I don't know why wro4j didn't force that version by default

Original comment by rj.kuszn...@gmail.com on 13 Jun 2014 at 10:20

GoogleCodeExporter commented 8 years ago
The sass-gems-3.2.1 is supposed to be added transitively to the classpath, so 
you shouldn't really add it explicitly. 

Closing this issue with invalid status. 

Original comment by alex.obj...@gmail.com on 13 Jun 2014 at 11:19

GoogleCodeExporter commented 8 years ago
If I don't add it explicitly, I'm given the above error. For some reason 
rwo4j-extensions was using some older sass-gems in my project.

Original comment by rj.kuszn...@gmail.com on 13 Jun 2014 at 11:35

GoogleCodeExporter commented 8 years ago
That is weird. The 1.7.5 uses sass-gems-3.2.1. 
You could use mvn dependency:tree  to check where the 3.2.0 comes from. 

Original comment by alex.obj...@gmail.com on 13 Jun 2014 at 11:38

GoogleCodeExporter commented 8 years ago
This is my result of "mvn dependency:tree" (with explicit force of sass-gems to 
3.2.1 removed):

[INFO] +- ro.isdc.wro4j:wro4j-extensions:jar:1.7.5:compile
[INFO] |  +- ro.isdc.wro4j:rhino:jar:1.7R5-20130223-1:compile
[INFO] |  +- org.apache.commons:commons-exec:jar:1.1:compile
[INFO] |  +- commons-pool:commons-pool:jar:1.6:compile
[INFO] |  +- com.google.code.gson:gson:jar:2.2.4:compile
[INFO] |  +- com.google.javascript:closure-compiler:jar:v20130411:compile
[INFO] |  |  +- args4j:args4j:jar:2.0.16:compile
[INFO] |  |  +- com.google.protobuf:protobuf-java:jar:2.4.1:compile
[INFO] |  |  +- org.json:json:jar:20090211:compile (version managed from 
20090211)
[INFO] |  |  \- com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO] |  +- com.github.lltyk:dojo-shrinksafe:jar:1.7.2:compile
[INFO] |  +- org.jruby:jruby-core:jar:1.7.11:compile
[INFO] |  |  +- org.ow2.asm:asm:jar:4.0:compile
[INFO] |  |  +- org.ow2.asm:asm-commons:jar:4.0:compile
[INFO] |  |  |  \- org.ow2.asm:asm-tree:jar:4.0:compile
[INFO] |  |  +- org.ow2.asm:asm-analysis:jar:4.0:compile
[INFO] |  |  +- org.ow2.asm:asm-util:jar:4.0:compile
[INFO] |  |  +- org.jruby.joni:joni:jar:2.1.1:compile
[INFO] |  |  +- com.github.jnr:jnr-netdb:jar:1.1.2:compile
[INFO] |  |  +- com.github.jnr:jnr-enxio:jar:0.4:compile
[INFO] |  |  +- com.github.jnr:jnr-x86asm:jar:1.0.2:compile
[INFO] |  |  +- com.github.jnr:jnr-unixsocket:jar:0.3:compile
[INFO] |  |  +- com.github.jnr:jnr-posix:jar:3.0.1:compile
[INFO] |  |  +- org.jruby.extras:bytelist:jar:1.0.11:compile
[INFO] |  |  +- com.github.jnr:jnr-constants:jar:0.8.5:compile
[INFO] |  |  +- org.jruby.jcodings:jcodings:jar:1.0.10:compile
[INFO] |  |  +- com.github.jnr:jnr-ffi:jar:1.0.7:compile
[INFO] |  |  +- com.github.jnr:jffi:jar:1.2.7:compile
[INFO] |  |  +- com.github.jnr:jffi:jar:native:1.2.7:compile
[INFO] |  |  +- org.yaml:snakeyaml:jar:1.13:compile
[INFO] |  |  +- com.jcraft:jzlib:jar:1.1.2:compile
[INFO] |  |  +- com.headius:invokebinder:jar:1.2:compile
[INFO] |  |  +- com.martiansoftware:nailgun-server:jar:0.9.1:compile
[INFO] |  |  +- org.jruby:yecht:jar:1.0:compile
[INFO] |  |  \- joda-time:joda-time:jar:2.1:compile (version managed from 2.3)
[INFO] |  +- org.jruby:jruby-stdlib:jar:1.7.11:compile
[INFO] |  +- nz.co.edmi:bourbon-gem-jar:jar:2.1.0:compile
[INFO] |  |  \- me.n4u.sass:sass-gems:jar:3.1.19:compile (version selected from 
constraint [3.1.16,3.2))

So it is using 3.1.19 instead.

Original comment by rj.kuszn...@gmail.com on 13 Jun 2014 at 11:44

GoogleCodeExporter commented 8 years ago
It is saying that version 3.1.19 is "selected from constraint [3.1.16,3.2)"
Is there any constraint defined in your pom.xml?

I have a sample project which depends on 1.7.5 and uses sass-gems-3.2.1 as 
expected.

Original comment by alex.obj...@gmail.com on 13 Jun 2014 at 11:47

GoogleCodeExporter commented 8 years ago
There aren't any constraints on sass-gems defined in my pom.xml. I don't know 
where that constraint comes from...

Original comment by rj.kuszn...@gmail.com on 13 Jun 2014 at 11:50