sass-java icon indicating copy to clipboard operation
sass-java copied to clipboard

Upgrade to lib sass 3.3

Open irundaia opened this issue 10 years ago • 11 comments

Hi,

My team is using sass on our project. Now we're moving to a continuous integration server, we can not longer use the command line version of sass (damn you corporate IT). As such we were looking to include your sass-java library in our build process. Unfortunately, we're using language features from sass 3.4. Since libsass 3.3 has been released, I was hoping you could upgrade to it.

irundaia avatar Nov 10 '15 22:11 irundaia

Great idea. Upgrade to latest libsass is planned for the next release. I hope to provide all the native libs soon(ish), thus I hope next week....

headcr4sh avatar Nov 12 '15 08:11 headcr4sh

I'm not sure whether I did it correctly, but I cloned your github library, updated the native directory and I tested it using mvn test.

All tests passed... Not sure whether I should have compiled the library directly though.

irundaia avatar Nov 12 '15 19:11 irundaia

Unfortunately the library needs indeed to be recompiled. This is a manual process at the moment and the dll/so files need to be placed in src/main/resources after they have been successfully created.

I have not (yet?) created a script to fully automatically create new libs for all the supported platforms.

headcr4sh avatar Nov 14 '15 13:11 headcr4sh

An automated script would be awesome! I've compiled libsass for OS X, replaced in the repo and run the unit tests. These tests were successful (except the test verifying the sass version updating the sass.xml file fixed this error). So I guess I can confirm that the upgrade works for OS X :)

I'll use my local library until a new update is available on maven. :)

irundaia avatar Nov 14 '15 22:11 irundaia

Ok. I'm glad that you have found a workaround for now.

headcr4sh avatar Nov 16 '15 11:11 headcr4sh

I've got a quick question, apparently, I've made an error when compiling the library. The problem resides in the way I compiled the shared library. Now, I've got a runtime dependency on /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.18'. This caused an error when I distribute my package.

Could you perhaps specify how you compiled the original libraries?

irundaia avatar Jan 03 '16 23:01 irundaia

You'll have to add -static-libstdc++ -static-libgcc to your CFLAGS / CXXFLAGS. I usually ended up patching the Makefile of libsass....

See also: http://www.trilithium.com/johan/2005/06/static-libstdc/

headcr4sh avatar Jan 04 '16 15:01 headcr4sh

Hi,

If you interested, I've uploaded the shared binaries libsass.zip for OS X and CentOS x32 & x64 , which were compiled by latest libsass version. Put these libraries in suitable folder in resources and provide correct version(3.3.4) in sass.xml. Tested on the El Capitain and CentOS 6, works fine with current JNA bindings.

roman0x58 avatar Mar 25 '16 10:03 roman0x58

Looks like the code has been updated to use libsass 3.3.6; could this be deployed to maven central?

roytruelove avatar Nov 29 '16 19:11 roytruelove

I am truly sorry for the late reply...

There has been quite a bit of activity around Sass and the general idea of providing Java-bindings to libsass but I don't have the time to keep up with things and provide up-to-date and well-tested native libraries. :-(

... I hope that this situation will change in 2017...

You might want to have a look at jsass (https://github.com/bit3/jsass) which seems to be well maintained....

headcr4sh avatar Dec 14 '16 20:12 headcr4sh

Well we do appreciate the efforts to date.. thank you!

roytruelove avatar Dec 20 '16 17:12 roytruelove