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

watchman VS watchfiles? #6

Open
ddahan opened this issue May 2, 2022 · 4 comments
Open

watchman VS watchfiles? #6

ddahan opened this issue May 2, 2022 · 4 comments

Comments

@ddahan
Copy link

ddahan commented May 2, 2022

Hi Adam,

First, thank for all your work. It helped me a lot!

I used to use Watchman after having read your article about it. I had two issues with it:

  • having to build my own arm64 binary for using it on mac m1.
  • and now Python 3.10 is not compatible (the fix is not released)

In the meantime, I just found out Watchfiles and your related django-watchfiles package.
I installed it along with django-browser-reload to make Tailwind CSS work with hot reloading.
Everything's great so far.

So the question is: is there any point to keep using watchman rather than Watchfiles with Django?

It not, are you planing to upgrade your blog post and maybe your book too?

Thanks!

@ddahan ddahan changed the title Watchman VS watchfiles? watchman VS watchfiles? May 2, 2022
@nickmccullum
Copy link

@adamchainz I came here with this exact question too! Hoping you can find some time to answer it soon.

@snmishra
Copy link

@ddahan and @nickmccullum For whatever reason, Watchman project stopped providing newer builds of pywatchman, although it's buildable from source and works fine.
I build my own at https://github.com/snmishra/docker-pywatchman/ and Docker images are available at https://hub.docker.com/r/snmishra/pywatchman/

@adamchainz
Copy link
Owner

Watchman seems to be having a bit of a maintenance crisis. The latest comment on the "Python 3.10 support" issue links to a tweet where the (sole?) maintainer at Facebook says they need to get it to pass the internal CI at Facebook: facebook/watchman#970 (comment) . I would also guess that Facebook aren't that interested in Python 3.10 support as they run their own fork of Python 3.8 called Cinder: https://www.infoworld.com/article/3617913/instagram-open-sources-high-performance-python-fork.html

Yes I started django-watchfiles to build an alternative to pywatchman. It's currently alpha level, and I haven't found the time to finish it off. When it's "production ready" and v1.0.0, I will update my books and blog posts accordingly.

Any issues you can find through testing django-watchfiles, or PR's, would be appreciated.

@odigity
Copy link

odigity commented Jan 15, 2023

Given that you also happen to be a Django maintainer, seems worth pointing out here that Django currently provides optional support for pywatchman as a more performant alternative to the default stat-based solution, and if pywatchman's got issues, would be nice if Django allowed other solutions - like watchfiles.

BTW - About to go try out watchfiles for the first time after checking out pywatchman and watchdog and seeing too many problems.

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

No branches or pull requests

5 participants