guard-annotate
guard-annotate copied to clipboard
guard-annotate running in an infinite loop
When trying to run guard-annotate, I found that it gets running without stop:
# Guardfile
guard 'annotate', routes: true do
watch( 'config/routes.rb' )
end
$ guard --debug
17:35:56 - DEBUG - Command execution: which notify-send
17:35:56 - DEBUG - Command execution: emacsclient --eval '1' 2> /dev/null || echo 'N/A'
17:35:56 - INFO - Guard is using NotifySend to send notifications.
17:35:56 - INFO - Guard is using TerminalTitle to send notifications.
17:35:56 - DEBUG - Command execution: hash stty
17:35:56 - DEBUG - Guard starts all plugins
17:35:56 - DEBUG - Hook :start_begin executed for Guard::Rails
17:35:56 - INFO - [Guard::Rails] will start the default web server on port 3000 in development.
17:35:56 - INFO - Starting Rails...
17:35:56 - DEBUG - Command execution: notify-send Starting Rails... Rails starting on port 3000 in development... -t 3000 -h int:transient:1 -i /home/pablo/code/rails/tarjira/vendor/bundle/gems/guard-2.6.0/images/pending.png -u low
17:35:56 - DEBUG - Command execution: {"RAILS_ENV"=>"development"} sh -c 'cd "/home/pablo/code/rails/tarjira" && rails server -e development --pid "/home/pablo/code/rails/tarjira/tmp/pids/development.pid" -p 3000 &'
=> Booting WEBrick
=> Rails 4.0.4 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2014-03-29 17:36:00] INFO WEBrick 1.3.1
[2014-03-29 17:36:00] INFO ruby 2.1.1 (2014-02-24) [x86_64-linux]
[2014-03-29 17:36:00] INFO WEBrick::HTTPServer#start: pid=11948 port=3000
17:36:02 - INFO - Rails started, pid 11948
17:36:02 - DEBUG - Command execution: notify-send Rails started! Rails started on port 3000. -t 3000 -h int:transient:1 -i /home/pablo/code/rails/tarjira/vendor/bundle/gems/guard-2.6.0/images/success.png -u low
17:36:02 - DEBUG - Hook :start_end executed for Guard::Rails
17:36:02 - DEBUG - Hook :start_begin executed for Guard::Annotate
17:36:02 - DEBUG - Hook :start_end executed for Guard::Annotate
17:36:02 - INFO - Guard is now watching at '/home/pablo/code/rails/tarjira'
17:36:02 - DEBUG - Start interactor
Frame number: 0/0
17:36:28 - DEBUG - Stop interactor
17:36:28 - DEBUG - Trying to run Guard::Annotate#run_on_modifications with ["config/routes.rb"]
17:36:28 - DEBUG - Hook :run_on_changes_begin executed for Guard::Annotate
17:36:28 - INFO - Running annotate
17:36:28 - DEBUG - Command execution: bundle exec annotate --exclude tests,fixtures -p
Nothing annotated.
17:36:31 - DEBUG - Command execution: bundle exec annotate -r -p
Route file annotated.
17:36:38 - DEBUG - Hook :run_on_changes_end executed for Guard::Annotate
17:36:38 - DEBUG - Start interactor
Frame number: 0/0
17:36:38 - DEBUG - Stop interactor
17:36:38 - DEBUG - Trying to run Guard::Annotate#run_on_modifications with ["config/routes.rb"]
17:36:38 - DEBUG - Hook :run_on_changes_begin executed for Guard::Annotate
17:36:38 - INFO - Running annotate
17:36:38 - DEBUG - Command execution: bundle exec annotate --exclude tests,fixtures -p
Nothing annotated.
17:36:42 - DEBUG - Command execution: bundle exec annotate -r -p
Route file annotated.
17:36:49 - DEBUG - Hook :run_on_changes_end executed for Guard::Annotate
17:36:49 - DEBUG - Start interactor
Frame number: 0/0
17:36:49 - DEBUG - Stop interactor
17:36:49 - DEBUG - Trying to run Guard::Annotate#run_on_modifications with ["config/routes.rb"]
17:36:49 - DEBUG - Hook :run_on_changes_begin executed for Guard::Annotate
17:36:49 - INFO - Running annotate
17:36:49 - DEBUG - Command execution: bundle exec annotate --exclude tests,fixtures -p
Nothing annotated.
17:36:53 - DEBUG - Command execution: bundle exec annotate -r -p
Route file annotated.
17:37:00 - DEBUG - Hook :run_on_changes_end executed for Guard::Annotate
17:37:00 - DEBUG - Start interactor
Frame number: 0/0
17:37:00 - DEBUG - Stop interactor
17:37:00 - DEBUG - Trying to run Guard::Annotate#run_on_modifications with ["config/routes.rb"]
17:37:00 - DEBUG - Hook :run_on_changes_begin executed for Guard::Annotate
17:37:00 - INFO - Running annotate
17:37:00 - DEBUG - Command execution: bundle exec annotate --exclude tests,fixtures -p
Nothing annotated.
17:37:04 - DEBUG - Command execution: bundle exec annotate -r -p
^C[2014-03-29 17:37:06] INFO going to shutdown ...
(I just run touch config/routes.rb
to "trigger" guard-annotate)
I also removed the guard-rails part, so it's something wrong with annotate.
I believe this happens because guard-annotate
it's looking for changes on the same file the annotate
gem it's changing. Maybe there's a way to 'ignore' the next change?