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
Error: RegExp too big when running WatchTask... #304
Comments
In this case, it sounds like your huge regex is genuinely too big. Searching around the Web yields various results about issues in both FF and Node for this. The reason overriding the default pattern fixes it in your case might be because it shortens the resulting regex enough for it to work. The only possible approach I can think of for fixing it would involve breaking things up into multiple regular expressions for each time things are added to the FileList, but that would require some substantial refactoring of the code. I'm happy to help if you're interested in giving this a try. |
hmm... i see. fwiw, this is a bit cleaner / clearer and accomplishes the same thing as twiddling the
so maybe there's some value in supporting something like conceptually, you could only apply the defaults if the user has NOT set up anything more specific - e.g. after the definition fn call here lib/watch_task.js#L63 - but i'm not seeing an easy way to detect that state beyond simply checking for the presence of the definition fn in the first place (iow, if no definition is provided, use default includes & excludes). and, yeah, that doesn't really solve things - just makes it a bit easier to fix if you bump up against it. just looking at the giant regex, i see almost all of it is made up of
and
etc, etc. Is there a way to skip the globbing step and just provide a simple regex for the -matt |
I think the simple regex for those two directories might be a good way to avoid the crazy lengthy final regex. Definitely worth a try. I've added you to the JakeJS org -- please feel free to give it a go. If the end result is good, and passes tests, we can add it to a next release. |
sounds good. thanks :) |
hey there -
thanks for the awesome tool! i've been using it for a while now and it's been delightfully reliable and helpful. except today. hehe! anyway, i'm trying to get a simple WatchTask working and i keep hitting an odd error:
here's my task:
the call to
.toArray()
causes the error - either when run from the task's definition function or when executing the base.watch()
command here --> https://github.com/jakejs/jake/blob/master/lib/watch_task.js#L70if i override the default include and exclude patterns before defining my watch task:
every thing works great! :-D
if you want to suggest some approaches to fixing, i'm happy to dig in and / or provide additional debug info.
-matt
The text was updated successfully, but these errors were encountered: