-
Notifications
You must be signed in to change notification settings - Fork 157
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
Replace Libsass dependency with sass-embedded #240
base: master
Are you sure you want to change the base?
Conversation
- Replaces Libsass dependency with sass-embedded
I've tested this and its working with Rails .scss files. |
@johnnyshields can you update the PR to allow |
Great work!!! We are super happy to see this as we've been discussing what to do regarding SassC in @discourse for a long time. This appears to be a drop-in replacement in most cases, but during my tests this appears to be more strict about source maps URLs and files, making quite a few specs fail. From a cursory look, this appears to be coming from new Ruby code, and not from dart-sass, so can this behavior be behind a knob of some sorts? |
@xfalcox given the complexity/magnitude of the change it will be much easier/cleaner to abandon SassC altogether and release this as a new major version. Maintenance releases (if any) for SassC can happen on the old major version branch. I have been running this branch in production without issues at TableCheck for several months. Let me know what steps I can take to get this PR merged. |
Yeah sure, 100% agree. What I meant is that I tried doing the upgrade to use this branch, and it works just fine, except for the call at https://github.com/tablecheck/sassc-ruby/blob/embedded-sass-merge/lib/sassc/url.rb#L35 started by https://github.com/tablecheck/sassc-ruby/blob/embedded-sass-merge/lib/sassc/engine.rb#L133 which tried to find a valid file path in the source map, which I don't think it's mandatory for the upgrade. Can we please, if possible, put this |
@xfalcox that sounds fine, can you raise a PR to my branch and I'll merge it? |
The gemspec currently includes |
@johnnyshields thanks, we're using it successfully in Production. I forgot to update my comment 🙈 |
I've also been using it in production for a few months on a large app with lots of scss files with no issue. |
Opened tablecheck/dartsass-ruby#1. With it I can get all specs to pass in @discourse with minimal changes and then work towards being able to re-enable the source map file validation over time. |
FEATURE: Option to disable source map path validation
@xfalcox looks good, just merged it. I appreciate if anyone can help get this PR merged and officially released on this gem. |
Sent another one with a oneliner fix from my previous PR. |
FIX: Missing end for if block
@xfalcox merged |
This is looking great at @discourse. We are just waiting on this PR to land and a new gem to be released with it. |
Who can merge this PR? |
I suspect that would be @bolandrm, at least that is the only person who currently can make a release, as the sole gem owner at RubyGems.org: https://rubygems.org/gems/sassc |
SassC means Sass in C (libsass). In my opinion, you should keep this gem as is and release the dart implementation as a new gem based on this PR and name it appropriately. |
No, I think it's more gems that would have to be updated to support this. Not sure if something in sprockets has to change but it would in sassc-rails and also sass-rails. More functionality from those gems would have to be duplicated if a whole new gem were to be created to replace that tree. I do think it makes sense to make this change here as a new major release in this gem as a stop gap. |
that's what happened with the original https://github.com/sass/ruby-sass gem sprockets still supports both separated gems I agree it's easier to keep it in this repo instead of duplicating the API to a new fork and forcing users to change the gem, but I don't believe the original and only maintainer will ever merge it, since he's been inactive for more than 2 years... |
I'm ready to start using this in production in @discourse. @bolandrm is there any change a major release of the gem can be cut using this? Should we give up on that and look into forking? |
dartsass-ruby gem is released! 🎉 |
dartsass-sprockets gem also released. Now time to test it! |
@xfalcox looks like its working. You can replace |
@xfalcox by the way, it looks like you broke a few tests related to sourcemaps. Please kindly take a look here: https://github.com/tablecheck/dartsass-ruby (sorry CI isn't running yet.) |
@johnnyshields thank you! Yesterday, I gave this a try locally and in our GHA CI. So far its worked great in development. Removing sassc has solved our primary issue with Docker builds as installing the gem alone would take ~4 minutes. Is it possible using either dartsass-ruby or dartsass-sprockets to specify a dart-sass I've noticed some broken links in the repo and on the gemspec from Rubygems so I'll create PRs for that. |
@johnnyshields can you please remove the fork relationship on both gems? You should be able to do this through GitHub chatbot https://stackoverflow.com/a/16052845 now. The reason is that I can't create a fork of dartsass-sprockets since it forks sassc-rails instead which already exists on my account. |
@javierjulio thanks for the chatbot link, I've raised the ticket for both gems just now. |
Combine Natsuki's sassc-embedded-shim-ruby gem with sassc-ruby
TODO:
.sass
(not.scss
) files work on Rails.