You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the live reload feature (gleam run -m lustre/dev start), each time I save an FFI (.mjs) file, the process fall in an infinite loop that triggers infinite reloads in the browser.
I run macOS 14.6.1, and could reproduce the issue with multiple editors including Zed & vi.
After quite a bit of digging around the fs module I found that after an initial (and correct) change detected on the saved FFI file (with events [Inodemetamod, Modified]), I get another change on this same file with the same events but a change on every other FFI files with the [] events. Then this loops again.
I’ve found a workaround by commenting out these two lines.
Oh how odd, I would think neither of those two things would trigger any fs events at all 🤔 I think @giacomocavalieri may have mentioned sometimes getting stuck in a similar loop but it's not something I've managed to run into yet (also Mac, also Zed).
I'll try to investigate, thank you for digging into it already!
When using the live reload feature (
gleam run -m lustre/dev start
), each time I save an FFI (.mjs) file, the process fall in an infinite loop that triggers infinite reloads in the browser.I run macOS 14.6.1, and could reproduce the issue with multiple editors including Zed & vi.
After quite a bit of digging around the
fs
module I found that after an initial (and correct) change detected on the saved FFI file (with events[Inodemetamod, Modified]
), I get another change on this same file with the same events but a change on every other FFI files with the[]
events. Then this loops again.I’ve found a workaround by commenting out these two lines.
dev-tools/src/lustre_dev_tools/cli/build.gleam
Lines 76 to 77 in 10452a0
So the issue seems related to the gleam compiler exporting the package information (or an interaction between this and the regular build process).
Sometime the build loop stops after some time, most of the time not. So we may have a race somewhere.
The text was updated successfully, but these errors were encountered: