CodeKit-1-Old icon indicating copy to clipboard operation
CodeKit-1-Old copied to clipboard

Sass compilation fails every time a partial changes that wasn't the last partial changed

Open brendanfalkowski opened this issue 11 years ago • 4 comments

Hate to open a new issue for this, but I don't see any way to re-open a closed issue. Please see: https://github.com/bdkjones/CodeKit/issues/318

brendanfalkowski avatar Dec 06 '13 20:12 brendanfalkowski

Are you using Compass? If so, disable the Sass-cache in your config.rb file.

bdkjones avatar Dec 09 '13 21:12 bdkjones

Yep, I am using Compass. I added this to my config.rb file based on: http://sass-lang.com/documentation/file.SASS_REFERENCE.html#caching

Sass::Plugin.options[:cache] = false

This does indeed make compiling slower, but it seems to have reduced the number of compilation errors by about half. However I still frequently get this error (every 3-5 saves): https://github.com/bdkjones/CodeKit/issues/318#issuecomment-29113610

brendanfalkowski avatar Dec 14 '13 18:12 brendanfalkowski

A bit more info about this problem. My projects always generate two CSS files from:

  • app-mq.scss
  • app-no-mq.scss

The only thing they do is import _app-loader.scss which imports all the other partials, and there is a variable assigned to either include or exclude media queries. Example:

$mq-support: true;
$mq-fixed-value: false;
@import "app-loader";
$mq-support: false;
$mq-fixed-value: 1024px;
@import "app-loader";

I imagine what happens is compilation of these two files kicks off and somewhere the cache starts stepping on the toes of the other compilation process (always app-mq.scss fails to compile). It appears to be reverse alphabetical which I tested by changing the file names.

The best during-dev fix is disabling import of "app-loader" in app-no-mq.scss, but if I'm testing in older browsers then I end up hitting CMD+S two times whenever I save a partial. These makes the fans go wild, but the second compilation usually works without errors.

Ideally they would just compile.

brendanfalkowski avatar Dec 14 '13 20:12 brendanfalkowski

Hi Brendan,

Can you send me this project so I can take a look? Thanks.

-Bryan

On 14 Dec 2013, at 12:15, Brendan Falkowski [email protected] wrote:

A bit more info about this problem. My projects always generate two CSS files from:

app-mq.scss app-no-mq.scss The only thing they do is import _app-loader.scss which imports all the other partials, and there is a variable assigned to either include or exclude media queries. Example:

$mq-support: true; $mq-fixed-value: false; @import "app-loader"; $mq-support: false; $mq-fixed-value: 1024px; @import "app-loader"; I imagine what happens is compilation of these two files kicks off and somewhere the cache starts stepping on the toes of the other compilation process (always app-mq.scss fails to compile). It appears to be reverse alphabetical which I tested by changing the file names.

The best during-dev fix is disabling import of "app-loader" in app-no-mq.scss, but if I'm testing in older browsers then I end up hitting CMD+S two times whenever I save a partial. These makes the fans go wild, but the second compilation usually works without errors.

— Reply to this email directly or view it on GitHub.

bdkjones avatar Dec 15 '13 19:12 bdkjones