github / pages-gem

A simple Ruby Gem to bootstrap dependencies for setting up and maintaining a local Jekyll environment in sync with GitHub Pages
http://pages.github.com
MIT License
1.82k stars 350 forks source link

github-pages `jekyll-sass-converter` dependency is still version `1.5.2` #813

Open BenSouchet opened 2 years ago

BenSouchet commented 2 years ago

Before submitting an issue, please be sure to

This issue affects

Questions

Currently in the dependencies file jekyll-sass-converter is still version 1.5.2 but the current version available is 2.1.0, my question is why hubot haven't bump to the new version ? Is there dependencies issues ? Where can I find theses info ?

Additional information

Link to the release page of jekyll-sass-converter: https://github.com/jekyll/jekyll-sass-converter/releases

Github Pages dependencies file: https://github.com/github/pages-gem/blob/master/lib/github-pages/dependencies.rb#L11

BenSouchet commented 2 years ago

I just see that's related to this hubot PR https://github.com/github/pages-gem/pull/749 But I can't see the errors, I get Error: We are currently unable to download the log. Please try again later.

Can someone re-run the checks ? @yoannchaudet @parkr

parkr commented 2 years ago

@BenSouchet Jekyll 3.x does not support jekyll-sass-converter 2.0:

Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies.....
Bundler could not find compatible versions for gem "jekyll-sass-converter":
  In Gemfile:
    github-pages was resolved to 223, which depends on
      jekyll-sass-converter (= 2.1.0)

    github-pages was resolved to 223, which depends on
      jekyll (= 3.9.0) was resolved to 3.9.0, which depends on
        jekyll-sass-converter (~> 1.0)

Based on this, you can see that Jekyll 3.9.0 requires jekyll-sass-converter 1.x only. Jekyll would need to release a 3.10 which allows jekyll-sass-converter 2.0.

BenSouchet commented 2 years ago

@parkr Okay, have you the ability to push in that direction, I know there is very little chance that it will be done but it doesn't cost much to try because the current situation is blocked.

We will have finally the chance to use Dart Sass implementation, I hope (since all implementations are deprecated 😞 ) but jekyll-sass-converter current version is 2.1.0 so Jekyll would not take it into account knowing that it still uses version 1.5.2. It's currently a dead-end.

Creating this version 3.10.0 would offer the possibility to unblock the situation, I guess it's not top priority but if you can push in that directly it would be so cool.

Thanks.

parkr commented 2 years ago

It's not an easy process, but I'm going to spend a little time on it here: https://github.com/jekyll/jekyll/pull/8939

BenSouchet commented 2 years ago

@parkr Thanks you ❤️

parkr commented 2 years ago

We will have finally the chance to use Dart Sass implementation

jekyll-sass-converter v2.1.0 uses sassc, which uses libsass under the hood. https://github.com/sass/sassc-ruby

The Dart-Sass implementation does not yet have a stable release, so it wouldn't be wise to release it to GitHub Pages before it's considered stable. Additionally, the sass-embedded gem has a runtime dependency on google-protobuf which can be challenging to install for folks.

If you want to use this soon, I'd really recommend adding a precompile step to use the sass script provided by dart-sass: https://github.com/sass/dart-sass/releases. With Pages on GitHub Actions in the works, you'll be able to customize your builds so you will be able to easily add the compilation step before running jekyll build and publishing your site. 🔜

BenSouchet commented 2 years ago

@parkr Hi 👋, your last paragraph seems great news, if I understand correctly "soon" we will be able to customize the Github Pages actions so we will be able to add the "sass to css" (using Dart Sass) ourself 🤔

But just to come back to the topic, the idea was (at least in my head):

  1. Create a new 3.x release of Jekyll to support jekyll-sass-converter 2.x (that was you did here https://github.com/jekyll/jekyll/pull/8939 )
  2. Update github-pages to use the latest version available of jekyll-sass-converter (that why I opened this issue)
  3. Release a new version of jekyll-sass-converter with the option to select the Dart implementation to use, embedded-sass refers to Dart Sass and was added by ntkme. I try to push for this to happen here: https://github.com/jekyll/jekyll-sass-converter/issues/122

And since 5 days ago, the Dart Sass as stable version available 🎉, you can also check here, I still think that releasing the Dart Sass option with a new release of jekyll-sass-converter would be the best option so everyone using Github Pages can use the current (not deprecated) version of Sass with all the amazing features, because the last version of Sass we can use in more than 2 year old, so every features /bug fix,... added to Sass for the last 2 years isn't available.

In either way, @parkr thanks for the work you do and the time you took reading my messages 😊 and trying to fix the Sass dead-end Github Jekyll is currently.

PS: Even if the current Dart Sass implementation wasn't 100% stable knowing that to use it the user has to edit his _config.yaml file to choose to use this implementation I don't think it is really annoying (and the user can edit back his _config.yaml file to use back the default sassc impl. in case he as issues, or report them to the github repo.)

ntkme commented 2 years ago

The Dart-Sass implementation does not yet have a stable release, so it wouldn't be wise to release it to GitHub Pages before it's considered stable. Additionally, the sass-embedded gem has a runtime dependency on google-protobuf which can be challenging to install for folks.

@parkr Both dart-sass-embedded and sass-embedded gem are now on stable release. We just had a release cut for jekyll-sass-converter 2.2.0.

Regarding the concern about protobuf, I would say the compatibility is actually very good, which you can see from this test matrix. It works for MRI >=2.6 and JRuby on mac, linux, and windows. Only compatibility issue I found so far is that protobuf sometimes causes crashes in TruffleRuby, but that appears to be a problem of TruffleRuby itself.