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

Fix hot-reloading on Windows #2544

Merged
merged 2 commits into from
Jun 20, 2024
Merged

Conversation

matthunz
Copy link
Contributor

@matthunz matthunz commented Jun 19, 2024

I found hot-reloading doesn't seem to be working for me on Windows because the initial output of rsx has template names like:

src/main.rs:9:5:0

while hot-reload updates have different names such as:

src\main.rs:9:5:0

This converts the template path to a UNIX-style path to be compatible with the file! macro. This seems to fix hot-reload on my machine but I'm not sure how robust this is just yet. I'd love some help testing!

@matthunz
Copy link
Contributor Author

Maybe related? #1867 I'll try to check if this was the issue

@jkelleyrtp jkelleyrtp merged commit 5ae7fd6 into DioxusLabs:main Jun 20, 2024
10 checks passed
@jkelleyrtp
Copy link
Member

jkelleyrtp commented Jun 20, 2024

Thanks! Didn't realize at first that segments is the right way to do it.
There might be issues with segments containing / sequences on windows

jkelleyrtp added a commit that referenced this pull request Jul 23, 2024
* Moves index.html creation until after wasm creation so the webserver doesn't prematurely serve the page
* sets up nasm for windows builds (to be superseded by Remove Dioxus CLI NASM dependency #2666 #2682)
* puts magnanis-cli-support in a blocking task to prevent threadlocking during sequential builds
* changes order of client/server builds such that the client is built before the server so the webserver doesn't prematurely serve invalid client code
* declobbers "serve" such that each project gets a different dir in the target folder
* uses nest_service instead of fallback so the router doesn't respond with fallback codes
* reincorporates doge's fix from Fix hot-reloading on Windows #2544
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 this pull request may close these issues.

2 participants