Fix dx serve printing the ready banner before the first build completes - #5745
Open
humdrum00001010 wants to merge 1 commit into
Open
Fix dx serve printing the ready banner before the first build completes#5745humdrum00001010 wants to merge 1 commit into
dx serve printing the ready banner before the first build completes#5745humdrum00001010 wants to merge 1 commit into
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dx serveprinted the "Serving your app" readiness banner right after the dev server socket came up, beforebuilder.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 existingbuilds_opened == 0check 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