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

dx serve does not build if the process is backgrounded #3522

Closed
miguelpduarte opened this issue Jan 8, 2025 · 0 comments · Fixed by #3586
Closed

dx serve does not build if the process is backgrounded #3522

miguelpduarte opened this issue Jan 8, 2025 · 0 comments · Fixed by #3586
Labels
bug Something isn't working cli Related to the dioxus-cli program

Comments

@miguelpduarte
Copy link

Problem

If the call to dx serve is backgrounded, it freezes the build process. It resumes as soon as the process is brought back to the foreground.

Steps To Reproduce

Steps to reproduce the behavior:

  • Launch the dev server in a Dioxus project and background it: dx serve &
  • Visit the browser in the expected http://localhost:8080/
  • See that the webpage is frozen and permanently loading
  • Issue fg in the same terminal as in the first step
  • Notice that immediately the build process resumes and website is loaded correctly (we do not get the prompt back, though)

Expected behavior

dx serve should be able to be backgrounded without interrupting the build process.

The CLI command should detect

Screenshots

N/A

Environment:

  • Dioxus version: CLI: dioxus 0.6.1 (c2952a7), 0.6.1 in cargo project.
  • Rust version: 1.82.0
  • OS info: MacOS
  • App platform: web

Additional information

  • This is especially relevant when using Dioxus as a Tauri front-end, as the beforeDevCommand foregrounds the dx serve command, which then makes the whole website not load.
  • Even though dx serve has a -i option (interactive), the issue persists even with -i false. This option should ideally remove the need for having a tty session attached, hiding output and building with hot-reloading silently in the background.

Questionnaire

I don't have time to fix this right now, but maybe later

@ealmloff ealmloff added bug Something isn't working cli Related to the dioxus-cli program labels Jan 13, 2025
@ealmloff ealmloff self-assigned this Jan 14, 2025
@ealmloff ealmloff removed their assignment Jan 20, 2025
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 a pull request may close this issue.

2 participants