rules_sass icon indicating copy to clipboard operation
rules_sass copied to clipboard

Make `rules_sass` available on registry.bazel.build

Open ztl8702 opened this issue 2 years ago • 5 comments

(Just creating a TODO for now, not claiming to do it)

ztl8702 avatar Jan 23 '23 13:01 ztl8702

Does it need to be migrated to be based on rules_js first? (is it a good idea for https://github.com/bazelbuild rules to be based on aspect.dev maintained rules?)

It looks like it might simplify things

ztl8702 avatar Jan 23 '23 13:01 ztl8702

this will need to be changed, since rules_js does not have ExternalNpmPackageInfo provider:

https://github.com/bazelbuild/rules_sass/blob/57ade0914a9ef5ec3bba660b184ac618097ed05e/sass/npm_sass_library.bzl#L50-L53

ztl8702 avatar Jan 23 '23 14:01 ztl8702

Coincidentally, I ran into this yesterday too, when trying to migrate a repo from rules_nodejs to rules_js.

Both of the issues mentioned above (migrating to bzlmod and migrating to rules_js) are significant work. rules_sass hasn't seen real development for a couple of years, so I'm not sure if anyone is willing or able to do them.

On the other hand, the sass ruleset is simple. sass_library just aggregates sources and sass_binary invokes sass in a straightforward way. I forked the rule set and replicated its behavior, powered by rules_js, in an hour or two. My fork isn't public, but I'm open to sending it upstream if folks want.

Ubehebe avatar Jan 24 '23 22:01 Ubehebe

yeah I realized it is easier to just run a genrule that invokes sass cli

ztl8702 avatar Jan 25 '23 01:01 ztl8702

I created a Dart Sass-based rules_sass here that doesn't depend on NodeJS. Hopefully it would be useful to people.

GZGavinZhao avatar Jul 26 '23 13:07 GZGavinZhao