-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Switch to dart-sass #496
Conversation
Thinking out loud here. Since we don't compile our CSS as soon as we use Perhaps this is the right time to consider compiling our Sass into CSS? We won't be restricted by the Sass implementations of other repos in this scenario. |
Correct – the current plan is to switch all repos over to dart-sass before introducing anything like Switching from compiling Sass to CSS may be a good idea but it seems like a much bigger project than I've budgeted myself this week :( E.g. There's a large number of cases where Murmur is importing our Sass and using its vars, so it'd be a lot of work to clean all that up. Would need a focused group effort I think (possible pitch?). |
The risk is something might slip through, and we won't realise until the other camps complain. If that's a risk we're willing to take it it would be good to see a plan for either:
|
I'm not sure what you mean here. Do you mean someone might accidentally use |
Yup, exactly. If we can't use the features of Dart Sass then this is just adding risk with no benefits (unless I've missed something) |
I see. I was thinking I was mitigating risk by doing all the repos over the course of 2 days or so, and only then considering using Would it help if we edited the CODEOWNERS so that any change to Kaizen (including the old drafts) go through us? I can personally inspect every PR to look for |
Update: We followed up on the above conversation, and agreed that the right approach would be:
|
Is this still the plan? I have a vague memory that there was a reason we completely dropped this project. Was it because we found that dart scss dramatically slows down compilation? (I could be misremembering this). I guess the fact that consuming repos are still relying on mixins and scss vars more than half the time is a major blocker for compiling to css only (or we remove all the mixins/vars in a huge breaking change release with the likely result of no one ever upgrades to the latest version of Kaizen) |
Ah damn, I had meant to follow up here with the results. Yeah, the compilation time was the issue – sometimes quoted as around 50x. In my case webpack actually ran out of memory and crashed! There might be some hope though. When I looked through my notes on it just now, I had saved a link to this discussion, which I meant to refer to to show how there was no way for us to use the fast version of Dart Sass, which is the Dart VM, since it wasn't available in JS. But it looks like such a thing may have been created in August, just after I dropped this project – see final comment here... |
oooh, sounds promising! |
So using the Dart VM (and whatever infra is required) was off the cards? |
Correct, there was no appetite for adding Dart to our tech stack. And I'm not sure there was even a way to get it to work even if there was appetite, hence the need for something like the wrapper mentioned at the end of that thread. |
This PR hasn't seen activity in two months! Should it be merged, closed, or worked on further? If you want to keep it open, post a comment or remove the |
This PR was closed due to 2 months of inactivity. Feel free to reopen it if still relevant. |
This PR was split off from #317, with the intention of shipping the dart-sass change before attempting any changes to our Sass code.
Dart-sass gives us various benefits like the ability to use
@use
, a sensible alternative to@import
that supports namespacing, forcing explicit imports, etc.Changes
node-sass
withsass
(an implementation ofdart-sass
) in the:Info
The API of
dart-sass
is said to be the same asnode-sass
, so I don't expect much friction.We should however expect slightly slower compile times after the switch (see below).
From the
sass
package page on npm: