Repository navigation
Prompt for an AppHost when a directory launch is ambiguous - #19541
Adam Ratzman (adamint) merged 7 commits into
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 19541Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19541" |
There was a problem hiding this comment.
Pull request overview
Adds AppHost selection when a directory-based debug launch is ambiguous.
Changes:
- Discovers buildable AppHosts before CLI launch.
- Prompts for a candidate and handles cancellation.
- Adds localization and unit coverage.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
extension/src/debugger/AspireDebugSession.ts |
Implements discovery and selection. |
extension/src/debugger/AspireDebugAdapterDescriptorFactory.ts |
Injects discovery service. |
extension/src/extension.ts |
Wires the service into the factory. |
extension/src/test/aspireDebugSession.test.ts |
Adds selection and cancellation tests. |
extension/src/loc/strings.ts |
Adds localized picker text. |
extension/package.nls.json |
Registers the localization string. |
Suppressed comments (1)
extension/src/debugger/AspireDebugSession.ts:1103
- After this picker returns a concrete path, the launch still forwards the original
default-discoveryorigin to the CLI. This was actually a user selection:AppHostSelectionOrigindefinesuser-selectionfor that case, and the existing picker path inAppHostLaunchService.ts:589uses it. Track an effective origin and change it touser-selectionwhen this picker selects a candidate so the CLI receives accurate provenance.
return selected?.appHostPath;
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Adam Ratzman (adamint)
left a comment
There was a problem hiding this comment.
Fixed the two open Copilot findings and moved ambiguous AppHost selection into the configuration provider, before the launch reservation and debug-session lifecycle. Full extension tests and the focused real Extension Host E2E pass. Looks good to me.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
2fcb1a1
into
microsoft:main
Description
When a debug configuration's
programpoints at a workspace directoryrather than a specific AppHost file, the extension previously handed
the directory straight to the Aspire CLI. If that directory contained
two or more buildable AppHosts with no configured default, the CLI
failed inside the non-interactive launch instead of prompting — there
was no way to tell it which AppHost you meant.
AspireDebugSessionnow discovers AppHost candidates for the directorybefore spawning the CLI:
default: unchanged, no prompt.
QuickPickletsyou choose which AppHost to launch, and the CLI is invoked with an
explicit
--apphostpointing at the selection.the CLI fail.
This is one piece of the "Ambiguous workspaces prompt for an AppHost
instead of guessing or failing inside a non-interactive launch" exit
criterion tracked in #19405.
No new dependencies.
AppHostDiscoveryServiceand the candidate-statushelpers this uses (
findWorkspaceDefaultCandidate,sortCandidatesByPath) already existed and are reused as-is.Fixes #19280
Checklist
<remarks />and<code />elements on your triple slash comments?