reflex icon indicating copy to clipboard operation
reflex copied to clipboard

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

Open dentroai opened this issue 1 year ago β€’ 1 comments

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):

  • Python Version: 3.12.2
  • Reflex Version: 0.6.1
  • OS: pop_os

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

dentroai avatar Oct 02 '24 14:10 dentroai

Additional info:

  • on MacOS, I don't reproduce that issue.

Lendemor avatar Oct 03 '24 13:10 Lendemor

I can reproduce on Linux (Arch).

adhami3310 avatar Oct 07 '24 21:10 adhami3310

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

adhami3310 avatar Oct 07 '24 22:10 adhami3310