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

fix: watcher pattern matching and retrying #1143

Merged
merged 6 commits into from
Nov 10, 2024

Conversation

AlliBalliBaba
Copy link
Collaborator

This PR fixes 2 small issues I noticed after testing the watcher on some real-life projects.

For once, this fixes an issue where pattern matching sometimes wasn't working with repeating folder-names (aka /app/app/app)

On the other hand, I noticed that epoll sometimes closes its connection after a while (at least on WSL), causing the watcher stop prematurely. This PR listens for the watcher 'stop' event and tries restarting the watcher 5 times before giving up.
(if I manage to definitely track down why epoll does this, I'll also forward it to e-dant/watcher)

internal/watcher/watcher.go Outdated Show resolved Hide resolved
@dunglas dunglas merged commit 56d5d50 into main Nov 10, 2024
46 checks passed
@dunglas dunglas deleted the fix/retry-watching-on-premature-close branch November 10, 2024 14:48
@dunglas
Copy link
Owner

dunglas commented Nov 10, 2024

Thank you!

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.

3 participants