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

cargo watch No longer auto reloading since 0.2.25 #430

Open
luxalpa opened this issue Feb 3, 2025 · 5 comments · May be fixed by #432
Open

cargo watch No longer auto reloading since 0.2.25 #430

luxalpa opened this issue Feb 3, 2025 · 5 comments · May be fixed by #432

Comments

@luxalpa
Copy link
Contributor

luxalpa commented Feb 3, 2025

Since version 0.2.25 cargo-leptos watch does not automatically recompile the code and restart the server on Windows when it detects changes. It seems like it doesn't detect changes at all. It still works in 0.2.24. The problem still exists in 0.2.27.

After some testing, I can confirm it is due to this commit: b900521

@sabify

@sabify
Copy link
Contributor

sabify commented Feb 3, 2025

My best guess is that line

causes the problem and the event will be ignored sent by Windows' ReadDirectoryChangesW API. I don't have Windows to test it out, but could you please add the following code before return and show me the logs here?

log::error!("Notify ignored the event {:?}", event);

@luxalpa
Copy link
Contributor Author

luxalpa commented Feb 3, 2025

listening on http://127.0.0.1:3000
      Notify ignored the event Event { kind: Modify(Any), paths: ["C:\\projects\\leptos-test\\src\\app.rs~"], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None }
      Notify ignored the event Event { kind: Modify(Any), paths: ["C:\\projects\\leptos-test\\src\\app.rs~"], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None }
      Notify ignored the event Event { kind: Modify(Any), paths: ["C:\\projects\\leptos-test\\src\\app.rs"], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None }
      Notify ignored the event Event { kind: Modify(Any), paths: ["C:\\projects\\leptos-test\\src\\app.rs"], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None }
      Notify ignored the event Event { kind: Modify(Any), paths: ["C:\\projects\\leptos-test\\src\\app.rs"], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None }

@sabify
Copy link
Contributor

sabify commented Feb 3, 2025

Thanks for sharing, my guess was right. I will create a patch for this.

sabify added a commit to sabify/cargo-leptos that referenced this issue Feb 3, 2025
windows isn't specific about the notify event (closes leptos-rs#430)
@sabify
Copy link
Contributor

sabify commented Feb 3, 2025

Could you please check this PR (#432) out and see if it is working?

@luxalpa
Copy link
Contributor Author

luxalpa commented Feb 3, 2025

Yes, it worked. Thanks!

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

Successfully merging a pull request may close this issue.

2 participants