Have `expandAlias` emit `TextEdit`s like the rename handler instead of a custom request
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
Inizia da ExpandAliasHandler, RenameService e ScriptExtentAdapter, usando #2312 e #2108 come contesto. Traccia quindi il plumbing esistente della richiesta powerShell/expandAlias e del client vscode-powershell, poi confronta l'output TextEdit del rename handler. Il lavoro è completato quando l'espansione degli alias emette edits per i command-name extents e il contratto del client viene aggiornato oppure la richiesta personalizzata viene deprecata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Follow-on from @JustinGrote's review on #2312: https://github.com/PowerShell/PowerShellEditorServices/pull/2312#pullrequestreview-4521187389
Yeah looks fine to me. As a follow-on issue we should probably update the rename handler to use this same code path if it isn't already.
The rename handler (RenameService) is already on the modern path — it uses System.Management.Automation.Language.Parser.ParseInput plus AST visitors and never used the legacy PsParser, so there's nothing to migrate there. #2312 brought ExpandAliasHandler onto the same modern parser.
The remaining divergence is in output shape, and the reusable direction is the reverse of "rename adopts expand-alias": expand-alias should adopt rename's edit model.
ExpandAliasHandlerresolves aliases, then returns a single wholesale-rewritten string over the custompowerShell/expandAliasJSON-RPC request.RenameServicewalks AST extents and returnsTextEdit[]over standardtextDocument/rename, usingScriptExtentAdapterto map PowerShell 1-based extents to LSP 0-based ranges.
This is also what #2108 itself anticipated: "return a proper edit (potentially deprecating the need for an entirely separate custom request)."
Proposed work:
- Rework alias expansion to emit
TextEdits (reusingScriptExtentAdapter) covering each command-name token's extent, instead of returning a rewritten document. - Investigate folding it into a standard LSP surface (e.g. a code action) and deprecating the custom
powerShell/expandAliasrequest + its client plumbing in vscode-powershell.
Note this changes the client contract, so it needs coordination with the extension — which is why #2312 was scoped to just the parser swap.
Drafted by Copilot (Claude Opus 4.8).
- Lingua principale
- C#
- Stelle
- 780
- Fork
- 267
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PowerShell/PowerShellEditorServices
-
Issue-Enhancement Needs: Triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
-
[Bug] None of the string overloads of `EditorExtensionServiceProvider.GetService()` work on .NET.Forse di nuovo libera @andyleejordan l’ha presa 143 giorni fa e non c’è nessuna pull request aperta. Aperta
PowerShell/PowerShellEditorServices#2331 · 1 reazione · 2 assegnatari ·
-
Improve Constrained Runspace Debug ExperienceForse già presa @JustinGrote l’ha presa 166 giorni fa. ApertaArea-Debugging Issue-Enhancement
PowerShell/PowerShellEditorServices#2294 · 1 reazione · 2 assegnatari ·
-
Issue-Bug Needs: Triage
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
PowerShell/PowerShellEditorServices#2293 · 1 commento ·
-
Document outline drops child variables when a function/filter reuses a variable name declared earlier (scope-blind declaration dedup)Forse già presa @JustinGrote l’ha presa 194 giorni fa. Aperta
PowerShell/PowerShellEditorServices#2282 · 1 commento · 1 reazione · 2 assegnatari ·
Tutte le issue di PowerShell/PowerShellEditorServices
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
GamaEdtech/gamatrain-back#977 ·
I maintainer di solito rispondono entro 1 giorno
-
area-templates triage:bot-seen triage:needs-human
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
microsoft/aspire#22356 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Needs-Triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
PowerShell/PowerShell#28432 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
microsoft/aspire.dev#2184 ·
I maintainer di solito rispondono entro 2 giorni
-
area-controls-refreshview platform/ios s/triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
dotnet/maui#40314 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno