-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
url functions no longer respect paths after a recompile #989
Comments
Seems likely that you've got compilation happening twice and it's misconfigured in one of them. Hunt & pecked on my iPhone... Sorry if it's brief! On Aug 12, 2012, at 8:11 PM, Kris Bulman notifications@github.com wrote:
|
I did forget to mention I am using image-url in a loop, and passing the results as a list. I've created a sample project that shows the problem:
http://github.com/krisbulman/compass-image-url-example Steps to reproduce:
|
Can anyone else reproduce this? |
I can reproduce it. Very strange :( |
I don't know if it's the same problem, but I've got a weird issue similar (yesterday and today) with |
I can confirm the same happens with |
This problem persists when rolling back compass versions (tried back to 12.1), so I started rolling back sass releases to determine when the bug was introduced. The bug was introduced in 3.2.0.alpha.277 released on July 27, 2012. For others who need this to work, use alpha 275 for now:
UPDATE: commit that this stops working on stable is: sass/sass@daf44b6 (merge conflict) Should this be a Sass bug report? |
Good sleuthing, this will help me debug the issue. I'm not sure who's bug this is, so let's just leave it here for now until I diagnose it. |
I stumbled on this bug when I wanted to try zurb foundation today. Uninstalling sass 3.2.x told me |
@idflood If you're looking to roll back to the working alpha version that doesn't produce this problem, first install the alpha 275 version:
then uninstall 3.2 and it won't give you that warning:
(choose the sass version that is not 275alpha) Note: I have just confirmed this bug also persists in 3.2.1 |
I have this same problem in sass-3.2.1 and compass-0.12.2. |
Confirmed with sass-3.2.1 and compass-0.12.2 |
Another confirmation with sass-3.2.1 and compass-0.12.2. I'm also using guard-compass (my own patch), although I'm getting the problem when not using it as well. |
OK, I did much more sleuthing on this problem. The commit that I mentioned stopped working earlier was a merge of two branches. I followed the other branch back and determined that this is the commit that creates the problem. The parent commit works: sass/sass@0db3cb6 |
I did a bit of debugging around this, and documented it here: https://gist.github.com/4d16fdbe950ecbe582de If anyone who is familiar with ruby/ruby debugging can point me on a fruitful path, I'd be grateful. |
That commit actually seems to solve the problem, and all debugging in the previous comment now report properly on second compile. What I'm not completely sure of is why it actually solves the problem, but I hope it's on the right path! I got the idea from the :filename string replacement in the new sass tests from the commit that caused this problem in the first place. |
Ive tracked it down to this method so far: https://github.com/chriseppstein/compass/blob/stable/lib/compass/sass_extensions/functions/urls.rb#L223-227 |
Problem is https://github.com/chriseppstein/compass/blob/stable/lib/compass/sass_extensions/functions/urls.rb#L224 is returning nil on an imported file |
Which is set here: https://github.com/chriseppstein/compass/blob/master/lib/compass/compiler.rb#L161 But dumping out the value always shows it set in both cases? where is it getting removed? Possibly something is not getting duped? |
When you dump the sass options on a _mixin.scss change there is not css_filename set {:style=>:expanded, :load_paths=>[/Volumes/SSD/Work/compass-image-url-example/sass, /Volumes/SSD/Work/compass/frameworks/blueprint/stylesheets, /Volumes/SSD/Work/compass/frameworks/compass/stylesheets, /Users/sdavis/.compass/extensions/testing/stylesheets, Compass::SpriteImporter], :cache=>true, :cache_location=>"/Volumes/SSD/Work/compass-image-url-example/.sass-cache", :syntax=>:scss, :filesystem_importer=>Sass::Importers::Filesystem, :cache_store=>#{:sha=>"08f2e2e5b03e6335e8f70d38f7778867c5aec147", :obj=>(Sass::Tree::RootNode Sass::Tree::ImportNode (Sass::Tree::RuleNode Sass::Tree::PropNode Sass::Tree::PropNode Sass::Tree::PropNode Sass::Tree::PropNode Sass::Tree::MixinNode) Sass::Tree::MixinNode)}, "c1ef5c9f97d8281df6465a6e757ee57af51e322c/_mixins.scssc"=>{:sha=>"433d307191c4c22cd423d45da437c99fc3df6ce0", :obj=>(Sass::Tree::RootNode Sass::Tree::VariableNode Sass::Tree::VariableNode Sass::Tree::VariableNode Sass::Tree::CommentNode (Sass::Tree::FunctionNode Sass::Tree::ReturnNode) (Sass::Tree::RuleNode Sass::Tree::PropNode) Sass::Tree::CommentNode (Sass::Tree::MixinDefNode Sass::Tree::VariableNode Sass::Tree::VariableNode Sass::Tree::VariableNode Sass::Tree::PropNode Sass::Tree::PropNode Sass::Tree::PropNode Sass::Tree::PropNode Sass::Tree::CommentNode Sass::Tree::VariableNode (Sass::Tree::ForNode Sass::Tree::VariableNode Sass::Tree::VariableNode Sass::Tree::VariableNode) Sass::Tree::PropNode) Sass::Tree::CommentNode (Sass::Tree::MixinDefNode (Sass::Tree::DirectiveNode Sass::Tree::PropNode Sass::Tree::PropNode Sass::Tree::PropNode Sass::Tree::PropNode Sass::Tree::PropNode)))}}>, #]>, :line_comments=>true, :importer=>/Volumes/SSD/Work/compass-image-url-example/sass, :compass=>{:logger=>#, :environment=>:development}, :filename=>"/Volumes/SSD/Work/compass-image-url-example/sass/_mixins.scss", :original_filename=>"/Volumes/SSD/Work/compass-image-url-example/sass/style.scss", :property_syntax=>nil} |
But it is when you change the top level file. {:style=>:expanded, :load_paths=>[/Volumes/SSD/Work/compass-image-url-example/sass, /Volumes/SSD/Work/compass/frameworks/blueprint/stylesheets, /Volumes/SSD/Work/compass/frameworks/compass/stylesheets, /Users/sdavis/.compass/extensions/testing/stylesheets, Compass::SpriteImporter], :cache=>true, :cache_location=>"/Volumes/SSD/Work/compass-image-url-example/.sass-cache", :syntax=>:scss, :filesystem_importer=>Sass::Importers::Filesystem, :cache_store=>#{:sha=>"f5597d0e6e0f7f82c7e4c52780d70130c3d28ea4", :obj=>(Sass::Tree::RootNode Sass::Tree::ImportNode (Sass::Tree::RuleNode Sass::Tree::PropNode Sass::Tree::PropNode Sass::Tree::PropNode Sass::Tree::PropNode Sass::Tree::MixinNode) (Sass::Tree::RuleNode Sass::Tree::PropNode) Sass::Tree::MixinNode)}, "c1ef5c9f97d8281df6465a6e757ee57af51e322c/_mixins.scssc"=>{:sha=>"433d307191c4c22cd423d45da437c99fc3df6ce0", :obj=>(Sass::Tree::RootNode Sass::Tree::VariableNode Sass::Tree::VariableNode Sass::Tree::VariableNode Sass::Tree::CommentNode (Sass::Tree::FunctionNode Sass::Tree::ReturnNode) (Sass::Tree::RuleNode Sass::Tree::PropNode) Sass::Tree::CommentNode (Sass::Tree::MixinDefNode Sass::Tree::VariableNode Sass::Tree::VariableNode Sass::Tree::VariableNode Sass::Tree::PropNode Sass::Tree::PropNode Sass::Tree::PropNode Sass::Tree::PropNode Sass::Tree::CommentNode Sass::Tree::VariableNode (Sass::Tree::ForNode Sass::Tree::VariableNode Sass::Tree::VariableNode Sass::Tree::VariableNode) Sass::Tree::PropNode) Sass::Tree::CommentNode (Sass::Tree::MixinDefNode (Sass::Tree::DirectiveNode Sass::Tree::PropNode Sass::Tree::PropNode Sass::Tree::PropNode Sass::Tree::PropNode Sass::Tree::PropNode)))}}>, #]>, :line_comments=>true, :importer=>/Volumes/SSD/Work/compass-image-url-example/sass, :compass=>{:logger=>#, :environment=>:development}, :filename=>"/Volumes/SSD/Work/compass-image-url-example/sass/_mixins.scss", :css_filename=>"/Volumes/SSD/Work/compass-image-url-example/css/style.css", :original_filename=>"/Volumes/SSD/Work/compass-image-url-example/sass/style.scss", :property_syntax=>nil} |
Could it be because the options became read only? |
Fixed in Sass. |
Amazing! see @nex3's fix here sass/sass#412 |
OS X 10.7.3
Ruby 1.9.3p125
Sass 3.2.0 (Media Mark)
Compass 0.13.alpha.0 (Markab)
Using relative_assets, image-url() and font-url() only pass the right path after a clean compile, and any subsequent manual compile produces only a filename with no path. This bug has been around since 3.2 alpha 275 of Sass this commit.
example:
modifying any file in the project, then just running compass compile changes the path to a wrong one:
config.rb
EDIT: updated with sample project details:
I've created a sample project that shows the problem:
http://github.com/krisbulman/compass-image-url-example
Steps to reproduce:
EDIT: updated with debugging details and commit
debugging: https://gist.github.com/4d16fdbe950ecbe582de
slight progress: #1062
The text was updated successfully, but these errors were encountered: