Closed leeola closed 10 years ago
It seems _loadCacheAndMonitor()
is being called. Not really sure why the Toffee tests are passing in consolidate.js :anguished:
edit: Is there a way to even disable this monitoring? Seems a bit strange to have monitoring enabled for a consolidate.js render call. Thoughts?
edit2: For now i'm just going to brutally hack render to not monitor files, thus enabling usage in consolidate.js. Please let me know what the proper course of action is, with the Toffee codebase. I'm not seeing any options to entirely disable these fs monitoring. (or fix whatever is causing it to hang heh).
@leeolayvar looking into this this morning. I've never used consolidate; it's just something I put in there because I thought other people might like. Off the bat:
Update: I fixed the unnecessary call to monitor files when using a cacheless engine for toffee.
Version bumped to 0.1.8.
Can you let me know if this problem with the dropped callback is fixed? One theory I have is that it was related to the unnecessary monitoring; the cacheless version wasn't just monitoring, it was re-monitoring on every render call, so eventually something was getting overwhelmed at the system level.
ah shit, I somehow just hit the wrong button and deleted your comment on github. From the notification email:
Just woke up, sorry for the response delay.
It was happening on every run of metalsmith-templates, if there was at least one render (ie, defining a toffee file in the markdown metadata).
To reproduce it: Create the three files seen here, install the requirements (metalsmith, metalsmith-markdown, metalsmith-templates, toffee) and run node build.js
I can confirm 1.8.0 fixes it (took me a while to realize that you posted it to npm rather than committing your changes haha)
Yes, my bad. I npm published and git committed, but forgot to push back to github. It's up here now.
Can I close this issue now that it appears fixed?
Haha, no worries.
And yea, i think it can be closed. I'll be testing this more today and reopen this if i see any edge cases/etc.
Thanks for your time! :)
As seen in this thread (segmentio/metalsmith-templates/issues/9), i'm got an issue where Toffee is hanging.
When i posted that thread, i wasn't sure what was hanging. At this point though, i have tracked it down to Toffee. Ie, if i remove
eng.run()
from the__consolidate_engine_render()
func (and call back with some fake string), everything works optimally.Something within Toffee is causing this so hang. Any thoughts what it might be?
I'm still digging.. i hope to find the function so i can actually use Toffee heh.