Closed ColinDKelley closed 3 years ago
You may need to rebase on master.
@ioquatix I believe all comments are addressed here. I merged up latest master as well. There were a couple build failures that came across with master. I sent a separate PR https://github.com/guard/listen/pull/488 for those and merged it in here.
Hi @ioquatix Anything else to do on this PR?
My apologies, I was busy for Ruby Kaigi conference. I'm reviewing it now.
I'll fix the Ruby 3 issues. However can you check why:
Failures:
1) Listen with one listen dir force_polling option to false with default ignore options two dirs with files in listen dir listens to dir move
Failure/Error:
expect(wrapper.listen do
mv 'dir1', 'dir2/'
end).to eq expected
expected: {:added=>["dir2/dir1/file1.rb"], :modified=>[], :removed=>["dir1/file1.rb"]}
got: {:added=>["dir2/dir1/file1.rb"], :modified=>["dir2/file2.rb"], :removed=>["dir1/file1.rb"]}
(compared using ==)
Okay, I see a bunch of specs are failing, I'll try to bring master back to green.
Okay, master is green again, can you rebase?
@ioquatix Thanks for getting master
green again. I've merged that in and now this branch is green too!
Can you please rebase on master so I can merge - please don't merge master into your branch because it creates a huge mess.
@ioquatix : Rebased and pushed.
Great work, thanks for your effort. Do you have time to jump on call some time this week to discuss a release plan/schedule?
Hi @ioquatix Thank you! Yes, this week is good for a call. I'm on US/Pacific
time. How about if we pick an exact time and medium by email?
Fixes issue #481 by removing code that attempted to synchronize threads with
sleep()
andThread#wakeup
. That was a race condition bug since ifwakeup
ran beforesleep()
, it would be lost and the sleeping thread would simply hang.Detailed changes:
:Mutex
/::ConditionVariable
to wait/wake up on state transitions. I factored this down into FSM since it's used in two state machine classes now.FSM
. Enforce symbol contracts, remove unnecessary methods, renamedefault_state
tostart_state
since the latter is standard FSM terminology. Also initialize withinitialize_fsm
vssuper()
.Queue#pop
to block front-end when waiting for events.Loop#setup
andLoop#resume
since they were always called consecutively. This allowed theListener
:front_end_ready
state to disappear.Loop#resume
andLoop#pause
since they were no-ops.teardown
tostop
to be consistent. (At some point I'd like to do a similar thing with:processing_events
. This could simply be called:started
.)