-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Listen 3x proposal #318
Listen 3x proposal #318
Conversation
require 'listen/listener' | ||
|
||
require 'listen/internals/thread_pool' | ||
|
||
# Always set up logging by default first time file is requried |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo spotted requried
=> required
.
Remove TCP functionality - does this mean that Listen cannot be used over network anymore? |
No, it's moved into two separate gems (see #319). ;) |
transition :backend_started if state == :initializing | ||
transition :frontend_ready if state == :backend_started | ||
transition :processing_events if state == :frontend_ready | ||
transition :processing_events if state == :paused |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use a case
statement here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because those steps are in a sequence - e.g. line 91 can set :frontend_ready
and line 92 tests for that. We can't "jump" from :processing
to :paused
, because we have to go through the states in between (which is what's happening here). Perhaps the last line could be if [:paused, :processing_events].include?(state)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok I get it, thanks for the explanation!
This PR looks definitely good. I'll try using it a bit and give you some feedback on how it works / performs for me! Thanks for the hard work @e2! |
Thanks for finding time to go through this! There's lots more that could be done. |
This was an attempt to fix some race conditions in tests, though ideally Record and Change should be improved to more accurately contain a consistent filesystem snapshot.
@rymai - if you have no objections, I'd like to release this as Listen 3.0. I want to get this version working with Spring ASAP, so people can finally start using Rails, recent Listen and Guard version without issues. While I took lots of care to make sure there are zero problems, even if I broke something, this won't affect many people, since lots of tools are locked to Listen 2.x (e.g. Guard), and if there are any issues, I prefer to discover them as soon as possible. So I don't see a reason for a pre-release, since for me this is master, and it's what I prefer to fix, debug and maintain - to me it's closer to "production ready" than Listen 2.x. Let me know if you disagree. |
No problem for me. I've been using this branch this week and it worked as a charm! 👍 |
See #319 for details
Commit messages are self-explanatory, including: