Skip to content
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

Second attempt on preventing an event buildup #569

Merged
merged 3 commits into from
Aug 22, 2023

Conversation

ctron
Copy link
Collaborator

@ctron ctron commented Jul 10, 2023

Follow up on: #516

See: #516 (review)

@ctron ctron force-pushed the feature/debounce_2 branch 2 times, most recently from eebc8b2 to 9470c01 Compare July 10, 2023 08:09
@ctron ctron marked this pull request as ready for review July 10, 2023 08:15
@ctron
Copy link
Collaborator Author

ctron commented Jul 10, 2023

I've tested this locally for a bit and will keep using this for the next few days. So far, this looks good too.

I know the PR requires a few finishing touches, I will do them once we agree on merging this.

@ctron
Copy link
Collaborator Author

ctron commented Jul 13, 2023

Works good on my machine. @thedodd any thoughts on this?

@ctron
Copy link
Collaborator Author

ctron commented Jul 19, 2023

@thedodd Is there anything wrong with this PR?

@ctron
Copy link
Collaborator Author

ctron commented Aug 10, 2023

I think I did everything asked for, implementing this twice. As I don't have any feedback and no idea why this doesn't get any attention, I will go ahead and fork this in the few weeks. I am absolutely open to bring all of this to the original project, but I also need something that others can easily install.

@thedodd
Copy link
Member

thedodd commented Aug 14, 2023

Please see my comments here: #588 (comment)

Also, I will do my best to get to these issues. I'll touch base with the other maintainers to see if they might have time to take a look as well.

@ctron
Copy link
Collaborator Author

ctron commented Aug 21, 2023

This is now released as part of the 0.17.5 release of trunk-ng.

@thedodd
Copy link
Member

thedodd commented Aug 21, 2023

Ok, looks like this is a known issue which folks are seeing: notify-rs/notify#259

As it turns out, this is not due to a library we are using, but comes from std::fs::copy, which I have verified. I don't know how broadly this applies across platforms; however, it is broad enough that it has impacted a lot of folks.

I've implemented a solution to address this. A cooldown period following a build. All events will be ignored following a build completion for the cooldown period, which I will hardcode to 1s for now. That should be enough without impacting the development flow.

@ctron I will merge your changes here (you've worked hard on this), but I am going to update the watch.rs file after merging. I've experimented with this PR, and I was still seeing the infinite build loop. After I merge this, I'll open a PR to highlight the changes.

Copy link
Member

@thedodd thedodd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, merging this. Thanks @ctron

@thedodd thedodd merged commit 5ffcb35 into trunk-rs:master Aug 22, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants