Skip to content
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

Switch from sass-rails to sassc-rails #34884

Closed
wants to merge 1 commit into from
Closed

Conversation

guilleiguaran
Copy link
Member

Ruby Sass will be deprecated on March 2019 so we are switching to use the SassC gem based on the LibSass C library.

sassc-rails is a drop in alternative to sass-rails.

This closes #32896

Ruby Sass will be deprecated on March 2019 so we are switching to
use the SassC gem based on the LibSass C library.

sassc-rails is a drop in alternative to sass-rails.
@@ -326,7 +326,7 @@ def convert_database_option_for_jruby
def assets_gemfile_entry
return [] if options[:skip_sprockets]

GemfileEntry.version("sass-rails", "~> 5.0", "Use SCSS for stylesheets")
GemfileEntry.version("sassc-rails", "~> 2.1", "Use SCSS for stylesheets")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove the upper version bound here? Like we’ve done for other dependencies.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree 👍

@guilleiguaran
Copy link
Member Author

Note for myself: We need to remove the sass dependency from SasscProcessor and SasscCompressor in Sprockets.

@matthewd
Copy link
Member

matthewd commented Jan 6, 2019

What does this mean for JRuby?

@ahorek
Copy link

ahorek commented Jan 7, 2019

JRuby is supported, see sass/sassc-rails#113

@deivid-rodriguez
Copy link
Contributor

After creating rails/sprockets#592, I'm wondering whether the sassc-rails dependency is actually needed, or it could instead be completely merged into sprockets. Thoughts?

@rafaelfranca
Copy link
Member

Why change a dependency if we can change sass-rails to do what we want? Also sass-rails or sassc-rails is only necessary to add generators, so most of the code should be in sprockets. All being said I don't think we need to use sassc-rails.

@deivid-rodriguez
Copy link
Contributor

Yeah, adding sassc support on sass-rails would be the smoothest path forward in my opinion too, since it would be completely transparent to rails users and would not require them to change any Gemfile dependencies.

timcheadle added a commit to simpledotorg/simple-server that referenced this pull request Jan 24, 2019
Ruby sass is being deprecated; see rails/rails#34884
timcheadle added a commit to simpledotorg/simple-server that referenced this pull request Jan 24, 2019
* Updated dashboard table titles

* Migrate from sass-rails to sassc-rails

Ruby sass is being deprecated; see rails/rails#34884
@guilleiguaran
Copy link
Member Author

guilleiguaran commented Feb 8, 2019

@rafaelfranca I think that ERB template support and the glob importer are the main differences between sassc-rails and sass-rails, do we want to drop them in sass-rails? or should we bring the sassc-rails implementation of those inside of sass-rails?

@guilleiguaran
Copy link
Member Author

Ok, my plan to move this forward is this:

  1. Update Sprockets requirement in sprockets-rails to be able to use the latest version of sassc importer.
  2. Change default Gemfile from sass-rails to sassc (we only need that for Sprockets importer)
  3. If someone wants/needs Glob imports or Erb support we can point them to use sassc-rails instead but for most of people just sassc will be enough. Maybe we should add sassc-rails commented with that info?

I don't think we should continue maintaining/releasing new versions of sass-rails when sassc/sassc-rails are well maintained under Sass organization and are very popular among many apps.

@rafaelfranca
Copy link
Member

We still need the generators, how are you planning to address it?

I don't think it is good to give control of one of our default gems to sass organization. I'd prefer to make sass-rails just a wrapper around sassc with generators support.

@guilleiguaran
Copy link
Member Author

I'm fine with keeping sass-rails if we don't need to copy over all the code to support glob imports and erb support from sassc-rails (in that case we will be just making a clone of sassc-rails).

@matthewd
Copy link
Member

ERB support seems very important, to me... glob imports I'd prefer to keep but could imagine sacrificing for good reason.

ISTM the smoothest compatibility bridge would be to turn sass-rails into a thin wrapper of sassc-rails -- that way anyone who upgrades their existing Gemfile will get the modern tooling. And moreso than who controls it, it keeps our Gemfile focused on the functionality it wants ("sass [language] integration for rails") over the technology that provides it (sassc).

@guilleiguaran
Copy link
Member Author

@matthewd thanks, I will do exactly that!

@guilleiguaran
Copy link
Member Author

Done in rails/sass-rails#424, so I'm closing this!

@guilleiguaran guilleiguaran deleted the sassc-rails branch March 16, 2019 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ruby Sass End-of-Life: 26 March 2019
6 participants