-
Notifications
You must be signed in to change notification settings - Fork 769
don't build apphost in cli when running in extension #12621
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
don't build apphost in cli when running in extension #12621
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12621Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12621" |
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.
Pull Request Overview
This PR simplifies the build skipping logic in the RunCommand by removing the capability-based check and always skipping the build when running in an extension host context. The change consolidates two previous conditions (extension host with DevKit capability OR single-file apphost) into a simpler approach where any extension host scenario skips the build, and removes the now-unused ShouldBuildAppHostInExtensionAsync helper method.
Key changes:
- Simplified build condition from
!isSingleFileAppHost || isExtensionHostto!isSingleFileAppHost && !isExtensionHost - Removed capability check (
KnownCapabilities.DevKit) for extension hosts - Removed
ShouldBuildAppHostInExtensionAsynchelper method and related logic - Simplified status message display to always show "Building app host" instead of conditionally showing "Connecting to app host"
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/Aspire.Cli/Commands/RunCommand.cs | Simplified build skipping logic to unconditionally skip builds when running in extension host, removed DevKit capability check, and deleted unused helper method |
| tests/Aspire.Cli.Tests/Commands/RunCommandTests.cs | Added test case to verify build is skipped when running in extension without requiring DevKit capability |
|
/backport to release/13.0 |
|
Started backporting to release/13.0: https://github.com/dotnet/aspire/actions/runs/19045123423 |
Description
Isolates the CLI change from #12568, because this behavior should be backported to 13. The apphost should always be built in the extension - the extension can choose whether to call dotnet itself or use a registered task provider like c# dev kit.
Checklist
<remarks />and<code />elements on your triple slash comments?doc-ideatemplatebreaking-changetemplatediagnostictemplate