Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Changing guard's parameters and watches doesn't actually use them without restarting guard #540

Closed
jmuheim opened this Issue Jan 2, 2014 · 15 comments

Comments

Projects
None yet
3 participants

jmuheim commented Jan 2, 2014

When changing guard's parameter (e.g. set all_after_pass from true to false for guard-rspec) or when changing watches, then it seems that Guard reloads the configuration, but I still have to restart it to make them work.

Is this the expected behavior?

Owner

thibaudgg commented Jan 3, 2014

Could you share your Gemfile & Guardfile please, an sample app with this issue would be great too. Thanks!

Owner

thibaudgg commented Jan 3, 2014

Mmm all seems good on the guard-rspec side, @rymai do you have an idea?

Owner

rymai commented Jan 5, 2014

I have no idea, but this is definitely not expected!

jmuheim commented Mar 1, 2014

This is still an issue for me. What can we do to investigate this further?

Owner

thibaudgg commented Mar 1, 2014

Could be related to #566 ?

jmuheim commented Mar 5, 2014

I investigated issue #566 and the suspicious "inline Guardfile" pops up also in my output:

josh@macbuech:~/Documents/Work/MuheimWebdesign/base (master *)$ guard
18:14:05 - INFO - Guard is using TerminalNotifier to send notifications.
18:14:05 - INFO - Guard is using TerminalTitle to send notifications.
18:14:05 - INFO - LiveReload is waiting for a browser to connect.
18:14:05 - INFO - Guard::RSpec is running
18:14:05 - INFO - Browser connected.
18:14:05 - INFO - Bundle already up-to-date
18:14:05 - INFO - Guard is now watching at '/Users/josh/Documents/Work/MuheimWebdesign/base'

Frame number: 0/0
[1] guard(main)>  <<<< HERE I CHANGE THE GUARDFILE (I remove "watch('db/schema.rb')")
Frame number: 0/0
[1] guard(main)> 18:14:14 - INFO - Browser disconnected.
18:14:14 - INFO - Using inline Guardfile.
18:14:14 - INFO - Guard is using TerminalNotifier to send notifications.
18:14:14 - INFO - Guard is using TerminalTitle to send notifications.
18:14:14 - INFO - Guardfile has been re-evaluated.

18:14:14 - INFO - LiveReload is waiting for a browser to connect.
18:14:14 - INFO - Guard::RSpec is running
18:14:15 - INFO - Bundle already up-to-date

Frame number: 0/0
[1] guard(main)> 18:14:15 - INFO - Browser connected.

Frame number: 0/0
[1] guard(main)> <<< WHY DOES IT PRINT OUT ANOTHER EMPTY PROMPT EACH TIME I SAVE SOME UNRELATED FILE?
Frame number: 0/0
[1] guard(main)>
Owner

thibaudgg commented Mar 6, 2014

Do you have any special pryrc or guardrc files?

jmuheim commented Mar 6, 2014

~/.pryrc:

Pry.commands.alias_command 'c', 'continue'
Pry.commands.alias_command 's', 'step'
Pry.commands.alias_command 'n', 'next'
Pry.commands.alias_command 'f', 'finish'
Pry.commands.alias_command 'd', 'disable-pry'

No ~/.guardrc.

Owner

thibaudgg commented Mar 6, 2014

Mmm Using inline Guardfile. is printed only from https://github.com/guard/guard/blob/master/lib/guard/guardfile/evaluator.rb#L143 so we should find why it's interpreted as inline when edited. @rymai any idea?

Owner

rymai commented Mar 6, 2014

Yep, I know why, I'll push a fix for that!

Owner

thibaudgg commented Mar 6, 2014

Awesome!

@rymai rymai self-assigned this Mar 6, 2014

@rymai rymai added fix and removed fix labels Mar 6, 2014

Owner

thibaudgg commented Mar 7, 2014

@jmuheim could you give a try at #568 PR?

jmuheim commented Mar 7, 2014

@thibaudgg perfect, it's working! 💃 💃 💃 🍻

@jmuheim jmuheim closed this Mar 7, 2014

rymai added a commit that referenced this issue Mar 7, 2014

Merge pull request #568 from guard/fix-540
Fix #540 & #566: Guardfile re-evaluation
Owner

rymai commented Mar 7, 2014

🍻 🍻 🍻 🍻 🍻!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment