Closed WoolenWang closed 3 years ago
when my project has a node_modules dir which have many sub directory auto generate by npm (like 1K npm pkg)
this will make the guard stuck in listen
https://github.com/guard/listen/blob/8d85b4cd5788592799adea61af14a29bf2895d87/lib/listen/adapter/base.rb#L75
@snapshots.values.each do |snapshot| _timed('Record.build()') { snapshot.record.build } end
when i debug follow to the code
it stuck go's here https://github.com/guard/listen/blob/8d85b4cd5788592799adea61af14a29bf2895d87/lib/listen/record.rb#L68
repeat run _fast_build_dir and not stop.... for over 5 minute.
the time is unacceptable.
add ignore config to exclude node_modules is not help.
change DEFAULT_IGNORED_DIRECTORIES to add like DEFAULT_IGNORED_DIRECTORIES = %r{^(?: \.git | \.svn | \.hg | \.rbx | \.bundle | bundle | node_modules | vendor/bundle | log | tmp |vendor/ruby )(/|$)}x is not help to
DEFAULT_IGNORED_DIRECTORIES = %r{^(?: \.git | \.svn | \.hg | \.rbx | \.bundle | bundle | node_modules | vendor/bundle | log | tmp |vendor/ruby )(/|$)}x
i fix this in my own environment , with this pull request
https://github.com/guard/listen/pull/459
Closing this issue since the corresponding PR was also closed.
when my project has a node_modules dir which have many sub directory auto generate by npm (like 1K npm pkg)
this will make the guard stuck in listen
https://github.com/guard/listen/blob/8d85b4cd5788592799adea61af14a29bf2895d87/lib/listen/adapter/base.rb#L75
@snapshots.values.each do |snapshot| _timed('Record.build()') { snapshot.record.build } end
when i debug follow to the code
it stuck go's here https://github.com/guard/listen/blob/8d85b4cd5788592799adea61af14a29bf2895d87/lib/listen/record.rb#L68
repeat run _fast_build_dir and not stop.... for over 5 minute.
the time is unacceptable.
add ignore config to exclude node_modules is not help.
change DEFAULT_IGNORED_DIRECTORIES to add like
DEFAULT_IGNORED_DIRECTORIES = %r{^(?: \.git | \.svn | \.hg | \.rbx | \.bundle | bundle | node_modules | vendor/bundle | log | tmp |vendor/ruby )(/|$)}x
is not help to