Discussion: How should “evaluate” work?
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 20/100
- Issue-Typ
- Feature
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- csharp, powershell
- Bereich
- api, developer-experience
Rechercherichtung
Beginne mit dem evaluate-Befehl und seinem Handler und untersuche dann, wie Start-EditorServices den PSHost und separate oder Out-of-Process-Runspaces konfiguriert. Vergleiche die drei vorgeschlagenen Ausgabepfade—Verwendung des übergeordneten Hosts, zurückgegebene Ergebnisse oder window/logmessage-Ereignisse—und definiere ein abgestimmtes Verhalten, das NamedPipes ohne doppelte Ausgabe unterstützt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Tagging @rjmholt and @andschwa
I discovered that the evaluate command has result hardcoded to ""
I don't necessarily think this is a bug since the output is supposed to be written to the host. However, in scenarios where we are strictly connected over NamedPipes, we have no way to gather the output.
My calling application already has a custom PSHost that sends output to the terminal over SignalR, so I tweaked the PSES code to use the host from my runspace instead of the one you guys created, and everything worked as expected. However, this means I need 2 websockets connections, one for JSONRPC and another for SignalR.
I have 3 ideas for fixing this and wanted you guys' take on it:
- Add -UseParentPSHost parameter to Start-EditorServices
This would be the easiest to implement. We already have the parent process's Host in the configuration object. Yes it will require my application to maintain a separate socket, but I'm doing that anyway.
I'd just need to ensure this host is also used when creating separate or out of process runspaces.
-
"Fix" the evaluate handler to return the result of the command so I can display that on my terminal. This gets hairy because then you have to ask whether you want the result to be the string output you'd see on the console or some sort of object representation that can easily be parsed by the calling application. For the sake of argument let's say the result should be terminal output string with colors encoded and all that. This can be accomplished by collecting all the output in the PSHost into a string and sending it along. However that means you get no output at all until execution completes which is undesirable for long running operations.
-
Make you guys' PSHost send window/logmessage events. I think this is the best way to do it, however I'd be concerned it could lead to duplicate output in the VS Code console as you guys are likely showing both stdout AND the window/logmessage event data.
I'd love to hear you guys' thoughts. Is there an easier way to do what I'm trying to do that I have perhaps overlooked?
- Vorherrschende Sprache
- C#
- Sterne
- 767
- Forks
- 266
- Ø Merge
- 3 T. 16 Std.
- Gemergte PRs (30 T.)
- 1
Entwicklungsumgebung
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus PowerShell/PowerShellEditorServices
-
[Bug] None of the string overloads of `EditorExtensionServiceProvider.GetService()` work on .NET.Evtl. wieder frei @andyleejordan hat das vor 93 Tagen übernommen, und es ist kein Pull Request offen. Offen
PowerShell/PowerShellEditorServices#2331 · 1 Reaktion · 2 zugewiesene Personen ·
-
Area-Language Server Issue-Enhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
PowerShell/PowerShellEditorServices#2315 · 1 Kommentar ·
-
Improve Constrained Runspace Debug ExperienceEvtl. vergeben @JustinGrote hat das vor 116 Tagen übernommen. OffenArea-Debugging Issue-Enhancement
PowerShell/PowerShellEditorServices#2294 · 1 Reaktion · 2 zugewiesene Personen ·
-
Issue-Bug Needs: Triage
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
PowerShell/PowerShellEditorServices#2293 · 1 Kommentar ·
-
Document outline drops child variables when a function/filter reuses a variable name declared earlier (scope-blind declaration dedup)Evtl. vergeben @JustinGrote hat das vor 144 Tagen übernommen. Offen
PowerShell/PowerShellEditorServices#2282 · 1 Kommentar · 1 Reaktion · 2 zugewiesene Personen ·
Alle Issues in PowerShell/PowerShellEditorServices
Ähnliche Issues
-
area-ai untriaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
dotnet/extensions#7790 ·
Maintainer antworten meist innerhalb von 1 Tag
-
P2 testing
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
Maintainer antworten meist innerhalb von 1 Tag
-
area-Infrastructure-coreclr os-ios os-maccatalyst os-tvos untriaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
dotnet/runtime#134766 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
0 - Backlog Bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
BrighterCommand/Brighter#4444 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 1 Tag