<kAworu>
grrr guard is not working well under FreeBSD for me, even with rb-kqueue :(
pkunc has joined #nanoc
pkunc1 has quit [Ping timeout: 258 seconds]
VitamineD has quit [Quit: mi dormas]
VitamineD has joined #nanoc
jugglinmike has joined #nanoc
<guardian>
damn
<guardian>
need to chase the reason why all items are oudated every time on a specific site again
<guardian>
ddfreyne: to have sass interact with nanoc, I pass the current RuleContext within the Sass Engine options hash
<guardian>
ddfreyne: doing so makes nanoc believe Rules has changed since the last compilation
<guardian>
ddfreyne: I guess this is because invoking the checksummer on the RuleContext instance ends up calling inspect because you can't invoke Marshal.dump on it
<guardian>
ddfreyne: any idea I on how I could improve that?
<guardian>
ddfreyne: is this by design of the Context base class which constructors does instance_variable_set calls?
VitamineD has quit [Ping timeout: 272 seconds]
<guardian>
ddfreyne: so I found out I need to tweak the checksum for a RuleContext. Currently I'm checksuming @config, @items, @layout and I'm ignoring @item, @item_rep and @site
<guardian>
does that sound good to you?
<ddfreyne>
guardian: RuleContext isn't really meant to be created and passed around. If you want to hand over stuff to sass, I'd pass in @item, @config, @layouts, ... manually.
<ddfreyne>
guardian: Or perhaps with a new SassContext class, perhaps.
<ddfreyne>
guardian: A lot of stuff which was meant to be internal-only (such as Context and RuleContext) is (or will be) changing in nanoc 4.
prxq has joined #nanoc
jonbullock has joined #nanoc
<guardian>
ddfreyne: I did the SassContext class before you replied
<guardian>
ddfreyne: it's just simpler to pass around config, items and layouts and then I can instance_eval from sass by writing in my scss e.g. nanoc('@config[:foo]') or nanoc("@items['/foo/'][:bar]")
<guardian>
ddfreyne: works really well, and dependencies are all fine
<ddfreyne>
guardian: That sounds useful :)
<guardian>
ddfreyne: well it is at least in the following situation: I have content/css/main.scss and a bunche of content/css/_*.scss
<guardian>
ddfreyne: partials are not compiled
<guardian>
ddfreyne: but main.scss imports _*.scss
<guardian>
ddfreyne: so while I could filter main.scss by :erb first, partials are out of touch
<guardian>
ddfreyne: at that point having a nanoc(string) sass function becomes handy
<guardian>
ddfreyne: because unless I overlooked something, SASS asks for a filename, not content which means there's no hook point to filter partials first before handing them to the SASS engine
<ddfreyne>
I'm a little too tired to understand what exactly is going on but if it works, that's good :)
<ddfreyne>
guardian: Do you think you can make a PR to nanoc master?