Cleanup the interactor code #355

Closed
wants to merge 7 commits into
from

Projects

None yet

3 participants

Contributor

This is a follow up to the Pry pull request #327 and introduces a continuous Pry session, so no stop/start cycle of the interactor on a Guard action anymore. It also cleans up some legacy support code that isn't needed anymore.

Current changes:

  • Remove interactor thread
  • Remove listen mutex
  • Remove tty store/restore

Known issues:

  • The prompt is not visible after a Guard action. We need to redraw the current line after a Guard action has been finished.
  • Using binding.pry starts another Pry instance.
netzpirat added some commits Oct 27, 2012
@netzpirat netzpirat Cleanup Pry interactor.
Remove all the interactor start and stop synchronization
and the terminal setting reset  completely, just to see
how well Pry does.
def484c
@netzpirat netzpirat Merge branch 'master' into interactor/cleanup
Conflicts:
	lib/guard.rb
477fe9b
@netzpirat netzpirat Merge branch 'master' into interactor/cleanup b3861e2
@netzpirat netzpirat Remove interactor threading code.
This cleans up old thread synchronization
code that is not used anymore with a
continuous Pry session.
5774c8f
rking commented Oct 30, 2012

I love the way the diffs are shaping up, but I am also having a few issues.

I have one Rails project where, if I require'pry';binding.pry at some point in test execution, the prompt comes up but is in contention with the Guard interactor Pry.

That same project does similarly with pry-rescue/minitest Pries.

I tried to replicate it on a tiny project but it doesn't exhibit the same behavior. Do you see it on your end, or should I bisect these two to figure out what triggers it? Sorry for not doing it right away — am at work and will be busy for next several evenings.

Contributor

Thanks for the feedback. I've added it to the known issues and will have a look soon.

Contributor

Since there's no way that bindings.pry would stop the Guard Pry session in another thread, the idea of a continuously running Guard Pry session will never work. So I'm going to abandon this pull request and cherry-pick the good parts.

@netzpirat netzpirat closed this Nov 6, 2012
Owner

😢

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