SassImporter is not marshalable. #507

Closed
cheald opened this Issue Dec 2, 2013 · 3 comments

Comments

Projects
None yet
4 participants

cheald commented Dec 2, 2013

Per https://github.com/nex3/sass/blob/master/lib/sass/importers/base.rb#L17 importers should be marshalable. Sprockets::SassImporter has @context which is not serializable. This breaks sass' caching.

Per @spohlenz's suggestion, the correct fix would be to define #_dump and ::_load on Sprockets::SassImporter so that it can be marshaled and restored. This significantly improves the repeated compilation speed of Sass 3.3.0 under Sprockets.

See the recent discussion on rails/sass-rails#36 for more detailed information.

nyarly commented Feb 12, 2014

I've implemented a temporary fix here: https://github.com/LRDesign/sass-rails-source-maps

But the right fix would be to correct this in Sprockets.

👍 would love to see this fixed!

bobbus commented Mar 6, 2014

👍 me too !

josh closed this in 655f129 Mar 10, 2014

josh locked and limited conversation to collaborators Aug 21, 2014

@chrisnicola chrisnicola referenced this issue in LRDesign/sass-rails-source-maps Aug 30, 2014

@nyarly nyarly Preliminary version of forked gem 11465d8

@Rendez Rendez added a commit to proudsugar/padrino-assets that referenced this issue Sep 12, 2014

@Rendez Rendez Caching of assets on problems with sprockets/sass 29f26b1
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.