-
Notifications
You must be signed in to change notification settings - Fork 684
Fix --watch hangs. #8585
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
Fix --watch hangs. #8585
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
/backport to release/9.2 |
Started backporting to release/9.2: https://github.com/dotnet/aspire/actions/runs/14314418109 |
omg conflicts |
@mitchdenny can you resolve here and in 9.2 pls. |
/backport to release/9.2 |
Started backporting to release/9.2: https://github.com/dotnet/aspire/actions/runs/14320264831 |
@mitchdenny backporting to "release/9.2" failed, the patch most likely resulted in conflicts: $ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Fix --watch hangs.
Applying: Don't prebuild in watch mode.
Applying: Fix up merge.
error: sha1 information is lacking or useless (src/Aspire.Cli/Commands/RunCommand.cs).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0003 Fix up merge.
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
* Fix --watch hangs. * Don't prebuild in watch mode. * Fix up merge.
* Add RPC protocol compat check. (#8577) * Add RPC protocol compat check. * Fix merge conflict. * Fix spelling. * Update DotNetCliRunner.cs Co-authored-by: David Fowler <[email protected]> * Improve error message with version info. --------- Co-authored-by: David Fowler <[email protected]> * Fix --watch hangs. (#8585) * Fix --watch hangs. * Don't prebuild in watch mode. * Fix up merge. * Add watch/no-build conflict fix. * Fix spelling. * Spelling. --------- Co-authored-by: David Fowler <[email protected]>
This PR fixes hangs when using
aspire run --watch
. There was a bug introduced when I split out the build leg from starting the app host. Basically I started attempting to launch the apphost in --no-build mode which is fine -except when you are in watch mode.RunAsync
checks for this and throws an exception, unfortunately awaiting the result ofRunAsync
doesn't occur until after the backchannel has returned.So the fix involves a few things:
--watch
we don't try launch the app host in--no-build
mode.RunAsync
where it checks and throws to also callSetException
on the backchannel completion source.