Skip to content

Get rid of sassc#1467

Merged
Edouard-chin merged 4 commits intoShopify:mainfrom
byroot:get-rid-of-sassc-2
Mar 16, 2026
Merged

Get rid of sassc#1467
Edouard-chin merged 4 commits intoShopify:mainfrom
byroot:get-rid-of-sassc-2

Conversation

@byroot
Copy link
Contributor

@byroot byroot commented Mar 4, 2026

Context

Shipit never followup the various asset pipeline changes, and is still using sprockets 3.x with sassc, which is becoming a problem now, because Shipit is part of the ruby-bench suite and sassc is causing problem on ruby-head: ruby/ruby-bench#476 (ruby/ruby-bench@5893da2)

Solution

I looked at using the newer SASS stack (sass dart etc) but it's very tricky as it means upgrading sprockets and a lot of other things, some SASS functions need to be reimplemented, and the compiler is throwing lots of deprecations.

Overall, vanilla CSS is now much more powerful that it once was when Shipit started, and the Shipit CSS hasn't changed much in years, I believe we might as well use vanilla CSS, and that makes migrating to something other than sprockets 3.x much easier in the future.

Implementation

I did compile the CSS with the existing compiler and then cleaned it up and re-introduced data-uri helpers using ERB, etc.

We do lose some things such as a few color functions that are now hardcoded colors, but here again I think it's not a huge deal. If one day someone feel like doing an overall of the CSS they might as well start from scratch anyways.

We may also want to consider doing something similar for coffee-rails, but it's not a problem today.

cc @Edouard-chin @etiennebarrie @rafaelfranca

Copy link
Member

@Edouard-chin Edouard-chin left a comment

Choose a reason for hiding this comment

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

👍 The hardcoded color is fine if if the advantage is removing sassc.

@tdickers any concern on your side changing this ?

Copy link
Member

@k0kubun k0kubun left a comment

Choose a reason for hiding this comment

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

❤️

@Edouard-chin Edouard-chin merged commit 46da1df into Shopify:main Mar 16, 2026
8 checks passed
@byroot
Copy link
Contributor Author

byroot commented Mar 16, 2026

❤️ thanks @Edouard-chin. Would I be pushing it, if I requested a release? It's so I can update: https://github.com/ruby/ruby-bench/blob/e420a71a39fbb16ef87ef174295552bd0a991e2a/benchmarks/shipit/Gemfile#L13

@byroot byroot deleted the get-rid-of-sassc-2 branch March 16, 2026 10:58
@Edouard-chin
Copy link
Member

I released 0.45.0. Thanks !

k0kubun added a commit to k0kubun/shipit-engine that referenced this pull request Mar 19, 2026
Same approach as Shopify#1467 for sassc-rails: compiled all CoffeeScript files
to plain JavaScript using the CoffeeScript 1.12.7 compiler (matching
coffee-rails 5.0), then removed the coffee-rails dependency entirely.

This is needed because coffee-rails depends on coffee-script which
depends on execjs, causing issues in ruby-bench
(ruby/ruby-bench#493).

- Compiled 18 .coffee files to .js using `coffee -bc` (bare compile)
- Preserved sprockets directives (require, require_tree, require_self)
- Preserved ERB in task/notifications.js.erb for image_path helpers
- Removed coffee-rails from gemspec and lib/shipit.rb
- No changes needed to HTML templates or asset precompile configuration
@k0kubun k0kubun mentioned this pull request Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants