Skip to content

Match nested files in watchmedo patterns with watchdog 7 - #768

Closed
itzzdev09 wants to merge 1 commit into
conjure-cp:mainfrom
itzzdev09:fix/watchdog-7-patterns
Closed

itzzdev09 wants to merge 1 commit into
conjure-cp:mainfrom
itzzdev09:fix/watchdog-7-patterns

Conversation

@itzzdev09

Copy link
Copy Markdown

watchdog 7 matches patterns with PurePath.full_match() (relative to the watched directory since 7.1.1), so *.hs (and *.rst for the docs target) no longer matches files in subdirectories. The etc/dev/live_* scripts and the docs watch target no longer react to files in subdirectories. For the docs target the _build/* ignore pattern gets a **/_build/* form too. The repository does not pin watchdog, so a fresh install gets 7.x.

Using *.hs;**/*.hs (*.rst;**/*.rst) matches at every depth again and selects the same files as before on watchdog 6, so no version bound is needed. The value is quoted so the shell does not treat ; as a command separator.

Checked with a live recursive watch on watchdog 6.0.0, 7.1.0 and 7.1.1: the old patterns miss nested files on 7.x, and the new ones report the same files that the old ones did on 6.0.0. watchmedo shell-command --recursive with *.py and *.py;**/*.py behaved the same way on 6.0.0 and 7.1.1. I did not run this repository's dev stack.

@conjure-bot

conjure-bot Bot commented Dec 1, 2026

Copy link
Copy Markdown

Automatically assigned this pull request to @itzzdev09.

If it makes more sense for someone else to own it, feel free to reassign it.

@ozgurakgun

Copy link
Copy Markdown
Collaborator

hi @itzzdev09 - I assume you do not personally use these scripts, is that true?

I do not use them either, so unless you need them for your workflow, instead of applying these updates I will remove the files.

Thanks!

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