Hello David,

This reasoning makes sense.

You say that watchman "keeps triggering the command once an event occurs". This 
is correct; as a consequence "the command" must stop the currently running 
instance of the development server and start a new one. This requires 
overhauling significantly the current implementation of the development server.

You need to understand the two-process structure of the current autoreloader 
and the workarounds for allowing runserver to start with invalid settings to 
get a good grasp on the requirements for a good developer experience. I hope we 
can do away with these workarounds with a better architecture.

Best regards,

-- 
Aymeric.



> On 3 Apr 2017, at 03:36, qingnian...@gmail.com wrote:
> 
> Hi Aymeric,
>   I feel like using Watchman might be the easiest solution. It keeps 
> triggering the command once an event occurs, so autoreload.py does not need 
> to restart the server in case of a syntax error. Pywatchman does not work on 
> Python 3 and has some dependency problems, so I'm planning to use the command 
> line interface of the Watchman library. Watchdog only triggers the given 
> command once, so it cannot survive a syntax error and requires the 
> auto-reloader to deal with multi-threading, the most challenging part in this 
> project (likely to enter the same problem described in #2330 
> <http://code.djangoproject.com/ticket/2330>.) Therefore, I'd start with 
> Watchman and see how to implement this with Watchdog later. How do you feel 
> about this plan? 
> 
> Cheers,
> David Ma
> 
> On Sunday, April 2, 2017 at 6:33:38 AM UTC-7, Aymeric Augustin wrote:
> Hello,
> 
> On 1 Apr 2017, at 05:52, qingn...@gmail.com <javascript:> wrote:
> 
>> For the pure-Python solution, I might implement a standalone autoreloader 
>> based on Carl's work and replace the current one. Does this look good to you?
> 
> 
> Perhaps.
> 
> It depends on the details (features, installation requirements, cross 
> platform support, etc.).
> 
> It's up to you to argument in your proposal why this would be a good solution.
> 
> Best regards,
> 
> -- 
> Aymeric.
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-developers+unsubscr...@googlegroups.com 
> <mailto:django-developers+unsubscr...@googlegroups.com>.
> To post to this group, send email to django-developers@googlegroups.com 
> <mailto:django-developers@googlegroups.com>.
> Visit this group at https://groups.google.com/group/django-developers 
> <https://groups.google.com/group/django-developers>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-developers/3c284301-15e9-44d9-9b7c-2d866b7f7d13%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/django-developers/3c284301-15e9-44d9-9b7c-2d866b7f7d13%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/E4AB822D-B4FF-44CD-972C-DBB3CCD6EC22%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to