CodeLens related commands cause exception to be thrown
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
Reproduziere das Problem mit dem monaco-powershell-Fork und seiner README.md, mit einer inmemory://model.ps1-URI und einer einfachen PowerShell-Funktion. Beginne bei src/PowerShellEditorServices/Services/Workspace/WorkspaceService.cs um Zeile 144 und verfolge die textDocument/codeLens- und codeLens/resolve-Anfragen. Fertig ist die Aufgabe, wenn diese Anfragen für In-Memory-Modelle keine Ausnahme mehr auslösen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Prerequisites
- I have written a descriptive issue title.
- I have searched all open and closed issues to ensure it has not already been reported.
- I have read the troubleshooting guide.
- I am sure this issue is with PowerShell Editor Services itself and does not reproduce in a standalone PowerShell instance, and is not an issue with my editor.
- I have verified that I am using the latest version of PowerShell Editor Services.
- If this is a security issue, I have read the security issue reporting guidance.
Summary
In the repository below, I have forked @TylerLeonhardt's old Monaco + PSES example, upgraded to the (almost) latest version of all packages, and wrote up how to reproduce the issue in the README.md.
https://github.com/mhintzke/monaco-powershell
Basically, regardless of OS (Windows or Unix) when the editor detects that the contents contains a basic function, e.g.
function Verb-Noun {
}
Then Monaco Client sends some commands such as textDocument/codeLens and codeLens/resolve. Both of which cause an exception to be thrown here
This is all using very basic configuration of the Monaco Editor and a model URI of inmemory://model.ps1. Basically when these commands are handled by PSES, they attempt to open the file at the uri above, but somehow along the way to the function above, gets translated into an "empty" string.
Because we are working with inmemory models here, I feel like we should just not even attempt to perform a File System read at all. I'm not 100% what the intended function of these commands are, but they might be not applicable in the scenario where we use inmemory models. Please correct me if I am wrong.
PowerShell Version
❯ $PSVersionTable
Name Value
---- -----
PSVersion 7.4.4
PSEdition Core
GitCommitId 7.4.4
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Editor Version
Monaco v7.0.7
PowerShell Editor Services Version
v3.20.1
(Invoke-RestMethod https://api.github.com/repos/PowerShell/PowerShellEditorServices/releases/latest).tag_name // v3.20.1
Steps to Reproduce
See forked repository README.md
Visuals
No response
Logs
No response
- Vorherrschende Sprache
- C#
- Sterne
- 767
- Forks
- 266
- Ø Merge
- 3 T. 16 Std.
- Gemergte PRs (30 T.)
- 1
Beitragsleitfaden
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. 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 ·
-
Area-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 ·
-
PowerShell/PowerShellEditorServices#2282 · 1 Kommentar · 1 Reaktion · 2 zugewiesene Personen ·
Alle Issues in PowerShell/PowerShellEditorServices
Ähnliche Issues
-
bug frontend good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
NavigationViewItemAutomationPeer implements IInvokeProvider but never advertises the Invoke pattern Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
unoplatform/uno#24629 ·
-
agentic-workflows Needs: Triage :mag: State: In-PR
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
-
bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
-
Type: enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
apache/arrow-adbc#4809 ·