Node recursive process when trying to generate docs
Closed this issue · 6 comments
Not sure if I'm missing something, but this is what I'm seeing:
File Structure:
client/
- src/ (all of my source code lives here)
- node_modules/
- grunt-docular/
- vendor (3rd party plugins here, don't want to generate docs for these)
- Gruntfile.js (grunt config for my build processes, includes the docular configuration shown below)
Gruntfile.js docular config:
docular: {
groups: [
{
groupTitle: 'Docs',
groupId: 'docs',
groupIcon: 'icon-book',
sections: [
{
id: 'apidocs',
title: 'Leading Reach Docs',
scripts: ['src']
}
]
}
],
showDocularDocs: true,
showAngularDocs: true
},
Docular task:
grunt.registerTask('lr-docular', ['docular']);
And when i run grunt lr-docular
from my command line, I see the following:
Which is followed by this, a few seconds later:
I've only put documentation into a single file so far, and have just been trying to testi it out. It seems like the docs I want to generate are being generated without any problems, but what are the rest of those sections that are firing afterwards? And how do I get rid of them?
This is interesting. I'll take a look. You can disable the parsing and rendering of the Docular and Angular documentation by changing the grunt configuration to (or ommit these altogether):
showDocularDocs: false,
showAngularDocs: false
I'm getting this same error. I was really optimistic about this doc generator, but this error is a deal breaker unless it gets resolved.
This still tries to generate angular docs:
showAngularDocs: false
Which, for me, is where the error is being thrown!
Hmm, yeah I see the same now after upgrading to NodeJS 0.10. Looks like many projects are affected. Digging in further. Thanks for the feedback.
Looks like this is all related to a change in Node 0.10 and several dependencies that grunt-docular has are probably affected. I'm researching this: http://stackoverflow.com/questions/15349733/setimmediate-vs-nexttick as it seems to be the source of the problem.
There could be significant work here to modify our code to avoid what we can and then do additional hackery to deal with current dependencies that exhibit this problem.
If you are experiencing this problem and need to get things going right away, I would look into downgrading to Node 0.8.
Okay, found an instance in the QQ library that was using nextTick... decided to start there since there is another issue to remove QQ and this solved the problem for me locally. I checked in the change and did a version bump on the NPM package. Try to update by doing
npm uninstall grunt-docular
--and then re-install
npm install grunt-docular
grunt-docular should pull in the latest version of the "docular" package which has the change. You can verify the version by running:
npm list
You should see grunt-docular in the tree and confirm "docular" is at 0.6.3
─┬ grunt-docular@0.1.2 -> /Users/john/Desktop/docular-packages/grunt-docular
├── colors@0.6.0-1
└─┬ docular@0.6.3 -> /Users/john/Desktop/docular-packages/docular
Let me know if this does not fix your problem. Thanks again @thebigredgeek for the feedback and @boroth for the screenshots!