-
-
Notifications
You must be signed in to change notification settings - Fork 585
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
Default to tick-based updates #1657
Conversation
This commit reintroduces code that was previously removed in favor of a notify-based update trigger. It turned out that notify-based updates can cause issues in larger repositories, so tick-based updates seemed like a safer default. extrawurst#1444 extrawurst#1310
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.
Thanks for taking this one ❤️
src/args.rs
Outdated
@@ -15,6 +15,7 @@ use std::{ | |||
pub struct CliArgs { | |||
pub theme: PathBuf, | |||
pub repo_path: RepoPath, | |||
pub notify_watcher: bool, | |||
pub poll_watcher: bool, |
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.
poll_watcher
should be deprecated by this, right? because it is the default
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.
what if we remove it? and people still call it?
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.
I followed your suggestion below and removed poll_watcher
.
After the removal, clap
prints an error when --poll
is passed as an argument: error: unexpected argument '--poll' found
.
src/main.rs
Outdated
#[derive(Clone, Copy, PartialEq)] | ||
enum Updater { | ||
Ticker, | ||
PollWatcher, |
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.
I would sunset the notify
based poll watcher entirely or do you see any point in keeping it?
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.
No, if it’s causing issues that are not fixable or unlikely to be fixed, it makes more sense to completely remove it.
* Default to tick-based updates This commit reintroduces code that was previously removed in favor of a notify-based update trigger. It turned out that notify-based updates can cause issues in larger repositories, so tick-based updates seemed like a safer default. extrawurst#1444 extrawurst#1310 * Add FAQ entry for --watcher * Remove --poll
This Pull Request fixes/closes #1444.
It changes the following:
PR that introduced the notify-based watcher: #1310
I followed the checklist:
make check
without errors