Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Improper dependency tracking for sass imports #1451
Steps to reproduce
Ok, first step towards solving my issue : running
Yeah, I'm trying to do my homework first and if really I can't find anything I'll ask for your help
What I've found so far: the problem comes from a sass file that has a huge list of dependencies that don't make any sense. Here's a small extract of
I'm trying to figure out where this dependency comes from, so far I haven't found anything intersting.
What happens is that if I modify "/en/legal/warranty/index.html", then nanoc think the sass file needs to be rebuilt. And it's kinda big, so it takes a while. Eventually nanoc figures out it built it for nothing because it's identical to the previous one, so it doesn't log an "identical" line, which causes a discrepancy between the "total" line and the actual sum of logged times.
Ok, I think I found the bug. It's a big hairy one
items.each do |item| if item.raw_filename
And, if I read
def depend_on(items) items.flat_map(&:reps).flat_map(&:raw_path) items.each(&:raw_filename) end
Long story short, the sass filter creates tons of spurrious, random dependencies. This doesn't yield a bad compilation, but it definitely slows things down an awful lot!