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

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

Open
brendanfalkowski opened this issue Dec 6, 2013 · 4 comments

Comments

@brendanfalkowski
Copy link

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

@bdkjones
Copy link
Owner

bdkjones commented Dec 9, 2013

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

@brendanfalkowski
Copy link
Author

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): bdkjones/CodeKit#318 (comment)

@brendanfalkowski
Copy link
Author

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.

@bdkjones
Copy link
Owner

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.

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

No branches or pull requests

2 participants