Open bpossolo opened 4 years ago
I’m pretty sure that the dart sass library can be compiled to a native library as well. I will have a look at it.
Any progress on this? It would be great to be able to use @use
, which only Dart Sass supports.
I'll try to see what the impact would be of migrating from libsass to a version of dart-sass compiled to libsass. Unfortunately, that would require having node on the target system. I haven't yet found a way to compile dart code to a shared library.
@bpossolo @danellis,
I've been making good progress with running a natively compiled version of dart-sass. Would you be able to help me test whether this solution works for you as well? (I'm trying to test it on as many platforms as I can.)
@irundaia sure I can help you test it out on my M1 Mac! I ended up moving to the dart-sass js implementation in the meantime since I was blocked but I'm sure others will benefit from the sbt-sassify update.
@irundaia Yeah, I can help test (Intel macOS). I'm currently using dart-sass from IntelliJ's file watchers, so I'd be glad to get away from that.
+1, I can test on Ubuntu / Fedora environments. Would love to use sassify and dartsass.
@irundaia Dart Sass releases its binaries on github https://github.com/sass/dart-sass/releases/tag/1.49.0. Changing the bundled binaries inside the published jar should solve the problem.
Nevermind, I thought you were invoking the cli. Now looking deeper I see your are using JNA to invoke the native methods from libsass, so moving to dart-sass will probably be harder since the native methods will be diferent.
@rwsargent, @Lasering, @danellis, @bpossolo, I've refactored sbt-sassify to include a version of dart-sass. Could you verify if this works with your setup.
To test the integration with dart-sass, take the following steps:
Could you let me know whether this works for your setup?
I might be doing something wrong. But for me it seems to not be working. The generated .css contains @use
which should have been removed by dart-sass.
Do you have a minimal example? Also, I might have forgotten to instruct you to use the dart compiler. >.<
Can you set the SassKeys.useDartSass := true
?
That was the missing part. Now it works.
I'm looking into this, running into an Akka mixed dependency error which I can't seem to resolve.
@rwsargent could you provide a minimal example of your setup that exhibits this behaviour?
@irundaia we've been able to successfully using your outlined steps here, which happens to also fix a docker aarch64 libsass.so issue we were facing with the 1.x build of sbt-sassify.
Are you able to publish version 2.0.0? Even the snapshot build would be great as we're having difficulty including the local snapshot version as a plugin dependency via project/lib directory.
Edit: My colleguea informed me he had to make the following change to get the build working on macOS aarch64
- addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.3")
+ addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.5")
@irundaia When I set cssStyle
to Minified the generated css has errors, I'm not sure if they are coming from sbt-sass or from sass it self.
@irundaia Any update on this, can the dart-sass branch be merged in and released?
As of Oct 26, 2020, libsass is now deprecated :(
The official recommendation is to move to dart sass instead.
I'm not sure what this means for the sbt-sassify plugin but it seems like having the Dart Sass binary installed locally may become a pre-requisite in the future.