#27685: Allow autoreloader to use watchman
-------------------------------------+-------------------------------------
Reporter: Aymeric Augustin | Owner: Tom
Type: | Forbes
Cleanup/optimization | Status: assigned
Component: Utilities | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tom Forbes):
* needs_better_patch: 1 => 0
Comment:
I've updated the PR considerably since last time. I've removed the entire
pyinotify mess and replaced it with a concrete, working (at least on my
machine!) watchman implementation.
I've also worked out a pretty decent way of testing the reloaders. If we
structure the inner loop as a generator we can run individual 'ticks' in
tests using `next()`. The first tick will set up the files to be watched.
Then we modify them in some way and then trigger another tick. This should
then pick up the modifications we have made and do the right thing.
I've used a metaclass to share 8 integration tests across the watchman and
stat reloaders. Individually each class passes but when run as a whole
module the watchman ones fail (perhaps due to the metaclass?), so I need
to look into that.
The watchman service is pretty good at cleaning itself up, if we can get
it installed on a CI worker I think it would be safe to just run in the
background indefinitely?
--
Ticket URL: <https://code.djangoproject.com/ticket/27685#comment:12>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.524195d156cad4972eb3c68394c4e87a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.