-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Crashes while looking for helper files in huge project subdirectories #1228
Comments
Approximately how many files/directories and how deep? Do you specify any arguments to Could you try removing Lines 141 to 143 in b886c5b
Could you try to narrow down to which patterns are causing this? I find it strange that just globbing for files would cause this. AVA must be reading in too much data somewhere. |
Removing those lines make no noticeable difference. Changing my package.json config, including removing it, seems to make no difference either. I'm able to reproduce with a new barebones project, but with the problematic subdirectory copied over. Interestingly, it seems to be the cumulative effect of all 4 glob patterns, and not any one in particular. Leaving 1 pattern, tests pass but takes 11s. Leaving 2, pass but takes 18s. Leaving 3, pass but takes 35s. With all 4, takes 55s and then exits with the error above. Adding the subdirectory manually to $ find dev/ -type d | wc -l
17630
$ find dev/ -type f | wc -l
107270 The folder is already in .gitignore. Would it make sense to automatically exclude those in |
Yes, that should be done regardless. Could you open a separate issue for that? |
This is caused by optimistically transpiling helper files. With RFC 001 we'll only transpile them when they're required in the workers. |
Clearly this hasn't happened yet. I think we should change how
This makes test file matching more understandable. We can then add support for helper patterns, so you can match those and we transpile them. A utility command that prints out what files are matched and how they're treated would also be useful. (Originally from #1320 (comment)) |
There are a number of issues related to this and the fix is very simple: clear/customize the helper matcher patterns. Would it not be possible to roll out a quick fix for this by making a |
I see this is a thoroughly discussed issue. Is there any workaround outside of forking and emptying that const array? |
Currently, ava looks for helper files in all project subdirectories excluding node_modules:
https://github.com/avajs/ava/blob/master/lib/ava-files.js#L90-L95
This can overwhelm ava when there exists subdirectories that are huge and/or with complicated fs hierarchies:
Allowing the specification of exclusion globs for helper files would help prevent this. We reverted back to v0.17.0 for now.
Environment:
node v7.4.0
linux 4.2.0-34-generic
ava v0.18.1
The text was updated successfully, but these errors were encountered: