reflex-dev / reflex

🕸️ Web apps in pure Python 🐍
https://reflex.dev
Apache License 2.0
19.65k stars 1.13k forks source link

When using Granian the .web folder doesn't get updated when hot reloading #4040

Open dentro-innovation opened 6 days ago

dentro-innovation commented 6 days ago

Describe the bug When using granian and running the app with reflex run, the hot reload works (for the default app at least, for another app it doesn't work even to compile), but the .web folder isn't updated.

To Reproduce Reflex init, install granian[reload], edit some file.

Expected behavior Hot reload updates the .web folder and view

Screenshots Video of behavior: https://www.tella.tv/video/reflex-reloaded-h0uw

Specifics (please complete the following information):

Additional context

Output when running it with --loglevel debug:

App running at: http://localhost:3000
Backend running at: http://0.0.0.0:8000
Debug: 
Debug:  ✓ Starting...
[INFO] Started worker-1
[INFO] Started worker-1 runtime-1
Debug:  ✓ Ready in 1964ms
Debug:  ○ Compiling / ...
Debug:  ✓ Compiled / in 1922ms (722 modules)
Debug:  GET / 200 in 2299ms
[INFO] Changes detected, reloading workers..
[INFO] Modified: /home/myaccount/reflex/tmp2/tmp2/tmp2.py
[INFO] Stopping worker-1 runtime-1
[INFO] Stopping worker-1
[INFO] Spawning worker-1 with pid: 1287387
[INFO] Started worker-1
[INFO] Started worker-1 runtime-1
[19:04:32] Compiling: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 13/13 0:00:00
Debug:  ✓ Compiled in 759ms (722 modules)
Debug:  GET / 200 in 44ms
Lendemor commented 5 days ago

Additional info:

adhami3310 commented 1 day ago

I can reproduce on Linux (Arch).

adhami3310 commented 1 day ago

It seems that the modules are not being re-imported and instead are cached :/