Closed chadlwilson closed 9 months ago
I tried working on a PR for dartsass-ruby today to fix this issue, but without success yet. Mostly because I've never looked at any of this code before. I tried making similar changes to the sassc-embedded-shim-ruby commit mentioned, but something is still not working correctly since the tests don't pass.
In the meantime, I've made a PR to dartsass-ruby to simply restrict the sass-embedded
dependency to the working versions, i.e. before 1.67.0 - as a temporary workaround, but it will save a lot of hassle for users of dartsass-ruby and dartsass-sprockets until we get a proper fix.
Note that the breakage happens with 1.67.0 . The upstream dart-sass project mentions a 'potentially breaking bugfix' in the 1.67.0 changelog, which I think could be related to the root cause. Perhaps that will help someone understand what changes need to be made to dartsass-ruby.
If anyone else wants to try making a PR for dartsass-ruby that implements a proper fix, then that would be great!
Author of sass-embedded
, sassc-embedded
, and contributor of the official dart-sass
here.
dartsass-ruby
is a fork that combines the original sassc
gem with my sassc-embedded
shim code into a single repository. Although it is not a showing as a "fork" on GitHub, technically it is. A fun fact is that despite no commit history is tied to me in the fork, my name was added to the LICENSE to fulfill the legal requirement because it was a copy-paste.
sassc-embedded
existed almost a year before tablecheck forked it, and I posted it once in sassc
issue (https://github.com/sass/sassc-ruby/issues/220). The reason that I did no advertisement is that I don't want to promote a stopgap solution. Someone did not get the idea, forked it, and promoted it everywhere. All of this happened with no prior commutations. After I pointed out that promoting a stopgap solution is not a good idea, the only thing happened is a "help wanted" issue (#2) with no progress at all... Ironically, despite of me pointing out many problems, I got an invite to become a maintainer of this project (https://github.com/ntkme/sass-embedded-host-ruby/issues/97). With all the backstory so far, of course I declined. A few months pasted and now we are here.
The fixes needed are already made in sassc-embedded
a while ago. However, I will not make any PR here, because I hate the counter productive entrepreneur thinking in open source. - The owner clearly does not want to maintain the project but still forked it and sold the project to the community, wishfully thinking if it could sell enough it will eventually attract maintainers. - I don't want to contribute to a project whose owner clearly has no intention to take the technical leadership or responsibility.
Finally, I have to say to the owner of this project: You forked it, you maintain it. Please be responsible.
@ntkme Thanks for the background information. It's not clear to me what you recommendation is for the best way forward.
Without wanting to go too far off-topic for this issue, do you agree that the proposed changes outlined in #2 are a good idea? Or is there some other approach that you would recommend instead? As far as I'm aware, there's no other gem offering integration between dartsass and sprockets, i.e. as an alternative to this one.
Yes. #2 is the right way forward if people still would like to continue use sprockets... sassc-embedded
has a very complex emulation layer to make custom functions and importers behave similar to sassc
. So, keep in mind that it will be a brutal breaking change when move directly to sass-embedded
without emulation, because the custom functions and importers works completely differently in the new API.
In the meantime, I've made a PR to dartsass-ruby to simply restrict the
sass-embedded
dependency to the working versions, i.e. before 1.67.0 - as a temporary workaround, but it will save a lot of hassle for users of dartsass-ruby and dartsass-sprockets until we get a proper fix.
This PR has been merged, and released in dartsass-ruby 3.0.2, so hopefully various projects will start working again.
If anyone else wants to try making a PR for dartsass-ruby that implements a proper fix, then that would be great!
Just for clarity, this bit is still required :smile:
Closing as the issue is fixed in dartsass-ruby.
Looks like there is some kind of breaking change in sass 1.68
Looks like https://github.com/tablecheck/dartsass-ruby/blob/51039a20e5a05aa778baed3fc4edfcb2f6efd3cf/lib/sassc/import_handler.rb#L109 needs an update, I guess something similar to https://github.com/ntkme/sassc-embedded-shim-ruby/commit/cb35862387c54647d04c2dc6d3ec7db4c4754102
(Sorry would raise the issue at
dartsass-ruby
but issues seem to be disabled on that repository.)