spacetime dev - Print feedback when client process exits#4469
Open
clockwork-labs-bot wants to merge 2 commits intomasterfrom
Open
spacetime dev - Print feedback when client process exits#4469clockwork-labs-bot wants to merge 2 commits intomasterfrom
spacetime dev - Print feedback when client process exits#4469clockwork-labs-bot wants to merge 2 commits intomasterfrom
Conversation
The main event loop blocked on file change events with no periodic check on the client process. If the client exited (e.g., user pressed Enter in the basic-rs template), spacetime dev gave no feedback. Now checks the client process status every second. On exit, prints: - 'Client process exited. File watcher is still active.' (success) - 'Warning: Client process exited with code N. File watcher is still active.' (failure) The file watcher continues running so module changes are still detected.
bfops
reviewed
Feb 26, 2026
| @@ -751,7 +751,7 @@ pub async fn exec(mut config: Config, args: &ArgMatches) -> Result<(), anyhow::E | |||
| .and_then(|c| c.get_one::<String>("server").ok().flatten()); | |||
Collaborator
There was a problem hiding this comment.
spacetime dev - Print feedback when client process exits
bfops
approved these changes
Feb 26, 2026
Collaborator
bfops
left a comment
There was a problem hiding this comment.
LGTM:
Running `target/debug/zeke_test`
Press any key to exit...
Connected to SpacetimeDB
Subscripted to the person table
Client process exited with code 0. File watcher is still active.
File change detected, rebuilding...
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.
The main event loop in
spacetime devblocked on file change events with no periodic check on the client process. If the client exited (e.g., user pressed Enter in the basic-rs template),spacetime devgave no feedback at all.Fix: Switch from blocking
recv()torecv_timeout(1s)and check client process status every second. On exit, prints:Client process exited. File watcher is still active.(exit code 0)Warning: Client process exited with code N. File watcher is still active.(non-zero)The file watcher continues running so module changes are still detected and published.