Skip to content

Fix dx serve printing the ready banner before the first build completes - #5745

Open
humdrum00001010 wants to merge 1 commit into
DioxusLabs:mainfrom
humdrum00001010:fix/serve-banner-timing
Open

Fix dx serve printing the ready banner before the first build completes#5745
humdrum00001010 wants to merge 1 commit into
DioxusLabs:mainfrom
humdrum00001010:fix/serve-banner-timing

Conversation

@humdrum00001010

Copy link
Copy Markdown

dx serve printed the "Serving your app" readiness banner right after the dev server socket came up, before builder.initialize() was even called - so it fired well before the first build (and thus the bundle on disk) existed. Anything that treats the banner as a readiness signal (a script tailing CLI output, a human copying the built bundle) can race the real build.

Move the banner into AppServer::open(), gated by the existing builds_opened == 0 check that already distinguishes the first successful open from subsequent ones, so it only prints once the app has actually been built and opened.

Verified manually: before the fix the banner printed ~27s before "Build completed successfully"; after the fix both print at the same instant, in the right order.

Closes #5744

…is ready

`serve_all()` printed the readiness banner right after starting the dev
server socket, before `builder.initialize()` was even called - so it fired
well before the first build (and thus the bundle on disk) actually existed.
Move it into `AppServer::open()`, gated by the existing `builds_opened == 0`
check that already distinguishes the first successful open from later ones.

Fixes DioxusLabs#5744
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.

dx serve: "Serving your app" banner prints before the build is ready

1 participant