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

Perform a full rebuild when a hot reload is not possible #3175

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ealmloff
Copy link
Member

@ealmloff ealmloff commented Nov 4, 2024

The CLI currently tries to hot reload changes to your Cargo.toml even though it is not used as an asset in the application. It should trigger a full rebuild because it is not linked as an asset. Other build time assets like an external lalrpop grammar that drives a build script should also trigger a full rebuild

@ealmloff ealmloff added bug Something isn't working cli Related to the dioxus-cli program labels Nov 4, 2024
@jkelleyrtp
Copy link
Member

jkelleyrtp commented Nov 13, 2024

I feel like we should special case certain files for this... I've much preferred the flow where r performs the manual rebuild rather than the CLI always attempting full rebuilds when it can't autodetect the reloads. Not every file is properly ignored by the gitignore and if you're doing things like emitting artifacts or modifying a database, the full rebuilds quickly get annoying.

We could parse the .d files which contain information about files the rust compiler is tracking itself, or frequently poll cargo check or something and listen to the rebuild information.

Also, FWIW, whenever the cargo.toml and dioxus.toml files change, we're not rebuilding our "understanding of the world" so our cargo metadata is out of date which we should fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli Related to the dioxus-cli program
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants