loco-rs / loco

🚂 🦀 The one-person framework for Rust for side-projects and startups
https://loco.rs
Apache License 2.0
4.04k stars 169 forks source link

Auto-reload as defined in FAQ constantly restarting #774

Open ycharron opened 1 week ago

ycharron commented 1 week ago

Description

As per the documentation FAQ (How can I automatically reload code?). Auto-reload is run as $ cargo-watch -x check -s 'cargo loco start'.

When I run the above command, the application reloads continuously ~every 1/2 second.

To Reproduce

I'm using a fresh (non-modified) SaaS, Server generated cargo app.

Expected Behavior

Only refreshes when code changes.

Environment:

Debian 12

jondot commented 1 week ago

Thanks for this report Can you run cargo-watch with --debug?

ycharron commented 1 week ago

I'm new to Rust thus still learning about its ecosystem, but here's what I found:

I've used SQLite before, but I don't remember the framework I used at the time executing the above, (or any) statement every second. Not sure if that's expected or not.