kriswallsmith / assetic

Asset Management for PHP
MIT License
3.75k stars 557 forks source link

Assetic/Compass errors in Symfony2 #690

Open ScienceofSpock opened 9 years ago

ScienceofSpock commented 9 years ago

Howdy! We recently ran into an issue with assetic/compass. We have 3 devs here. I'm in charge of styling our project. There are apparently a couple of misnamed sprites in my style sheets, eg. .icon-site-logo-small instead of .icons-site-logo-small. When I run assetic:dump it compiles just fine (though that sprite is obviously not present on the site) When one of my coworkers runs assetic:dump, he gets an error regarding the missing sprite. We cannot figure out why his errors and mine does not. Obviously, as the guy who's doing the styling, I'd really like to see those errors so I can correct them before committing/pushing my code. Any ideas why his errors and mine doesn't? I do get errors for other things, just not for missing sprites, it seems. Is there some setting I can turn on somewhere?

kriswallsmith commented 9 years ago

Is it possible you are using a Mac and the other person is using Linux? One filesystem is case-insensitive, the other is not.

ScienceofSpock commented 9 years ago

No, we're both on Ubuntu 14.04. Here's an example of what's going on. Lets say I have compass building a spritesheet called "icons" from the images in /images/icons/ and it puts the spritesheet in /images/sprites/

In my /images/icons/ directory, there is an image called "icon-site-small.png". The sprite css class for that would be .icons-icon-site-small. But instead of using @extend .icons-icon-site-small; instead I used @extend .icon-site-small;

Mine generates the spritesheet, and compiles the css files, all without complaining one bit. Of course, the css rule that I tried using the sprite in doesn't actually have the sprite, but compass didn't complain at all.

On my coworkers system, as soon as it gets to the rule that tries to extend .icon-site-small, it immediately bails and complains that it can't extend a non-existent rule.

I need to figure out how to get mine to behave like that, because I don't want my coworkers getting hung up by bad css rules that I should be catching. It feels like it's some kind of configuration option, but I don't know where it would be.