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

Open
miguelpduarte opened this issue Jan 8, 2025 · 0 comments
Open

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

miguelpduarte opened this issue Jan 8, 2025 · 0 comments

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

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

No branches or pull requests

1 participant