-
Notifications
You must be signed in to change notification settings - Fork 210
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
Eager ignore #372
Eager ignore #372
Conversation
c523c14
to
7797d0a
Compare
Could use some guidance about what may be annoying travis. The error message is broken (yui/yuitest#29) unfortunately. Test pass locally (or the relevant ones do, there are a number of intermittent errors that were present on master). |
YUIDoc can ignore paths when building a project. 0.8.1 the implementation is not very efficient, but after yui/yuidoc#372 lands you should see this change significantly improve docs build times (and possibly fix builds- I cannot seem to finish building ember docs without it).
My guess that yui/yuitest#29 doesn't resolves failing build of this PR, because it seems to show different errors with patching yui/yuitest#29. |
@okuryu these failures seem very unrelated though? |
@okuryu looking at yuitest failures again, but they do not seem related here. I sense a disturbance in the npm versioning of a dependency. This commit has a massive, huge impact on Ember and other codebases. Would appreciate any aid in getting it though, despite the slow progress of these codebases. |
@mixonic Sorry for my delay! Please let me try to investigate this ASAP. |
Any news? This change reduces our doc build times from about a minute to ~2secs, so I would really like to see this upstreamed. |
@mixonic A rebased version of this PR, consistently demonstrates this issue. |
7797d0a
to
22831d6
Compare
@mixonic not quite sure yet why their is a failure, but it does appear your test case passes without your provided implementation. Which suggests the test isn't quite correct. |
It seems Some tests blindly run on the whole |
@mixonic you likely should create a unit test, targeting something like: var dirs = Y.getDirs(__dirname + '/input/with-symlink', {
ignorePaths: [
'a/b',
'a/d',
'c'
]
});
// paths: 'a',
// ignorePaths: [
// 'a/b',
// 'a/d',
// 'c'
// ]
Assert.isArray(dirs);
console.log(dirs);
Assert.areSame(1, dirs.length, 'Failed to retrieve all path options');
Assert.areSame(dirs[0], 'expected Path'); |
@mixonic once this is green (and reasonable) i'll make sure it gets merged. |
de16e9c
to
a33cd43
Compare
Assert.areNotSame(-1, dirs.indexOf(pathPrefix + '/one'), 'contains path /one'); | ||
Assert.areNotSame(-1, dirs.indexOf(pathPrefix + '/one/two'), 'contains path /one/two'); | ||
}, | ||
'test: ignores paths': function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test fails without the changes to lib/utils.js
.
@stefanpenner The changes here are intended to more efficiently build a list of directories by avoiding traversal of ignored paths. There should be no changed behavior. However I've added a test for |
var json = (new Y.YUIDoc({ | ||
quiet: true, | ||
paths: ['input/'], | ||
paths: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests were naively presuming all fixtures were valid. I've narrowed the list to ones required for passing tests.
a33cd43
to
0762e60
Compare
|
||
$ npm install -g istanbul ytestrunner yuitest | ||
|
||
You are able to run unit tests by executing `npm test`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you need to do this? I think npm test
should works after run npm install
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test
command presumes that instanbul
is installed as a global executable:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npm run *
prefixes ./node_modules/.bin/
on the path, which should include istanbul
as it is devDep https://github.com/yui/yuidoc/blob/master/package.json#L83
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okie dokie, I'll attempt to remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
donezo.
Paths may be ignored because they contain a large number of files. The getDirs method should not actually descend into those ignored directories. Additionally this commit flattens the recursion in getDirs.
Merged. I'll publish a new version to npm in this weekend. |
Published v0.10.0. |
Paths may be ignored because they contain a large number of files. The
getDirs
method should not actually descend into those ignored directories. Specifically in Ember.js ourtmp/
andnode_modules/
directories may both be extremely large and have complex symlinking that trolls thevalidatePaths
method.Additionally this commit flattens the recursion in
getDirs
.