[pull] main from PowerShell:main - #2
Open
pull[bot] wants to merge 162 commits into
Open
Conversation
Removed the manual validation step because it is unnecesary (and annoying) to gate this pipeline since it opens an unpublished, draft release. The downstream triggered pipeline will gate the release to the VS Code marketplace.
Instead of having to maintain an edited copy (which was really annoying) I stubbed out `PSConsoleHostReadLine` to do what's expected. So now we can just use the existing shell integration script directly! Since we can't reliably find the script using `code --locate-shell-integration-path pwsh` we now rely on it being sent by the client on initialization. Its presence implies the feature is on. This is pretty VS Code specific, but not necessarily so. Apply suggestions from code review Thanks Patrick! Co-authored-by: Patrick Meinecke <SeeminglyScience@users.noreply.github.com>
Bumps the xunit group with 1 update: [xunit](https://github.com/xunit/xunit). Updates `xunit` from 2.6.6 to 2.7.0 - [Commits](xunit/xunit@2.6.6...2.7.0) --- updated-dependencies: - dependency-name: xunit dependency-type: direct:production update-type: version-update:semver-minor dependency-group: xunit ... Signed-off-by: dependabot[bot] <support@github.com>
Patch provided in xunit/xunit#2912
And so stop ignoring `VSTHRD002`.
By ensuring that our event queue is only accessed from the threadpool, not the pipeline thread. We now do this in the event handler and the assertions, instead of around calls to the `debugService`.
Avoiding pragmas wherever possible.
Which was silently broken due to a typo :(
The project is dormant an longer shipped/signed by Microsoft.
Until it's figured out how we're supposed to use these on GitHub.
Partially reverts commit 5b37344.
It's having weird bugs and we're giving up on it.
Otherwise PR gates get stuck on documentation changes.
Fix bad file name for vim-simple-test.vim
And rely on GitHub's automatic action.
Differentiate Azure DevOps from GitHub Actions.
`EditorContext.SelectedRange` is typed as `IFileRange` (it's actually a `BufferFileRange`), but `FileContext.GetText` and `GetTextLines` only accepted the concrete `FileRange` class. That meant the obvious script `$Context.CurrentFile.GetText($Context.SelectedRange)` failed overload resolution with "Cannot find an overload for GetText and the argument count: 1", and the documented workaround of constructing a `FileRange` isn't even reachable when that type isn't loaded. Widen both parameters from `FileRange` to `IFileRange`. The bodies already route through the `ToBufferRange()` extension defined on `IFileRange`, so nothing else changes, and `FileRange` callers keep working since it implements the interface. Adds focused regression tests covering `GetText`/`GetTextLines` with a `SelectedRange` and with a hand-built `FileRange`. Fixes #1496. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…62 (#2307) * Initial plan * Fix CanRegisterAndInvokeCommandWithScriptBlock test reliability on PS 5.1 The test was asserting on $global:extensionValue after invoking a script block command via Invoke-Command. In Windows PowerShell 5.1 / net462, the global variable set inside the script block is not reliably visible in subsequent command invocations, causing the test to fail intermittently. Replace the global-variable assertion with a scope-independent check: change the script block to Write-Output 10 and verify only that registration completes successfully (via the CommandAdded event) and invocation completes without error. The behavior being tested (script-block-backed commands can be registered and invoked) is still fully covered." * Restore value assertion in CanRegisterAndInvokeCommandWithScriptBlock Instead of passing ScriptBlock.Create() from C#, register the command using AddScript so the script block is created in PowerShell's own session state. ScriptBlock.Create() binds to the C# module context, causing $global: writes via Invoke-Command to land in an isolated scope on PS 5.1, making the value invisible to subsequent commands. With the script block created in PS session state, the $global:extensionValue assertion is reliable across all supported frameworks and is restored. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* Guard against workspace folders without a URI on initialize When a client sends `workspaceFolders` on `initialize` and one of the entries has no `uri`, the `OnInitialize` handler threw a `NullReferenceException` while resolving the initial working directory (`workspaceService.WorkspaceFolders.FirstOrDefault()?.Uri.GetFileSystemPath()`). The `?.` only guarded the folder being null, not its `Uri`, so calling `GetFileSystemPath()` on a null `Uri` blew up, the `initialize` response was never returned, and the server was unusable for that client. The same hazard exists in every other place we dereference `folder.Uri` (`WorkspacePaths`, `GetRelativePath`, `FindFileInWorkspace`). The issue (#2300) reports this as Linux-only with a repro that includes a valid `uri`; that exact payload doesn't actually throw (I reproduced both ways by driving a built PSES over stdio). The real trigger is a workspace folder lacking a URI, which is what the captured stack trace (`PsesLanguageServer.cs:line 150`) points at. - Add `WorkspaceService.AddWorkspaceFolders`, which owns the invariant that every folder in `WorkspaceFolders` has a non-null `Uri`. It skips null folders and folders without a URI (logging a warning) and treats a null collection as "no folders yet", falling back to the existing single-root and CWD behavior. - Call it from `OnInitialize` instead of the inline null-check plus `AddRange`. - Add a regression test covering null input and uriless/null folders. Fixes #2300. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Refactor workspace folder guard into a pure, testable filter Extract the null/URI-less filtering from `AddWorkspaceFolders` into a pure `GetValidWorkspaceFolders` helper. `WorkspaceService` remains the single chokepoint where client-supplied folders are ingested, so every downstream `Uri` dereference stays protected, but the filtering logic is now trivially unit-testable without constructing a service or logger. Drop the per-folder warning so the filter is a simple, allocation-free expression, and add direct tests covering null, empty, and mixed (null folder / URI-less folder / valid folder) inputs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Log a warning when skipping workspace folders without a URI Restore the per-folder warning that the previous refactor dropped. Silently discarding malformed workspace folders makes it hard for server operators to diagnose why a client's folder didn't take effect, and it matches the behavior the PR description advertises. Logging each skipped folder requires the explicit loop, so revert the pure `GetValidWorkspaceFolders` helper (and its dedicated tests); the existing `AddWorkspaceFoldersIgnoresNullAndUrilessFolders` regression test still covers null input, URI-less/null folders, and the downstream dereference. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When a watch or `evaluate` request resolved a naked variable reference, `GetVariableFromExpression` searched the flat `variables` list, which is populated broadest-to-narrowest (global, then script, then local, then stack frames). `FirstOrDefault` therefore returned the global/parent-scope copy of a variable whenever the same name also existed in a more local scope, even though the Variables explorer and PowerShell itself show the local value. We now search the local, script, and global scope containers in that order first, falling back to the full flat list so names that only live in a frame still resolve. This matches PowerShell's own variable resolution semantics. Added a regression test (and `VariableScopeTest.ps1`) that shadows a variable across scopes and asserts the local value wins. Fixes #1882. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The `powerShell/expandAlias` handler built an embedded PowerShell here-string that called `[System.Management.Automation.PsParser]::Tokenize` to find command tokens. That legacy tokenizer is Windows PowerShell / full-framework only and carries the parsing limitations that come with it. This rewrites the logic in C# against the modern, cross-edition APIs: - Tokenize with `Parser.ParseInput` and select command-name tokens via `TokenFlags.CommandName` instead of the legacy `PSTokenType.Command`. - Resolve every distinct name to its alias definition in a single `Get-Command -CommandType Alias` round-trip rather than re-defining a helper function and querying one token at a time. - Escape wildcard metacharacters with `WildcardPattern.Escape` so aliases whose names are patterns -- `?` (Where-Object) and `%` (ForEach-Object) -- resolve to themselves. The old script did this by hand with a leading backtick. - Rebuild the text by substituting from the highest offset down so the earlier extents stay valid as the length changes, preserving the existing behavior for multiple aliases on a line and multi-token definitions. Scripts with no aliases are returned unchanged. The JSON-RPC contract is untouched. I extended the E2E tests with a multi-alias line that includes the wildcard-named `?` alias, which the naive modern approach would mishandle. Fixes #2108 Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Make `OnIdle` tests deterministic by polling instead of sleeping `CanRunOnIdleTask` (and its twin `CanRunOnIdleInProfileTask`) were flaky on the net462 (Windows PowerShell 5.1) CI leg — the former was just caught failing on PR #2298's Windows job. The root cause is that `PsesInternalHost.OnPowerShellIdle` calls `Events.GenerateEvent(PSEngineEvent.OnIdle, ...)`, which only *enqueues* the event. For a subscriber registered with `-Action {...}`, PowerShell doesn't run the action scriptblock inline; it becomes a pending action that the engine dispatches asynchronously on the pipeline thread, around subsequent pipeline invocations. So the action's execution was never synchronized with the test's `$handled` read, and the fixed `Thread.Sleep(2000)` was just a timing guess — sometimes too short on the slower WinPS leg, leaving `$global:handled` still `$false` at the assertion. The key realization is that each *additional* pipeline execution gives the engine another chance to drain the pending action, so re-reading the handler variable in a loop both waits for *and* drives completion. I replaced the sleep with a shared `WaitForHandledAsync` helper that polls the variable (~200ms apart, ~15s ceiling) until it reports `$true`, returning the last observed value on timeout so the assertion still fails loudly. This keeps the tests' intent intact and isn't merely a longer sleep. I validated both tests on net8.0 (green across repeated runs, ~0.4s each vs. the old fixed 2s); net462 can't run on macOS, but the mechanism is identical across targets and the 15s ceiling self-terminates on success, so it's strictly safer on the slow leg without slowing the fast one. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Move `OnIdle` assertion into helper and drop list return Small follow-up to review feedback: both call sites only ever asserted the handler variable became `$true`, so the `IReadOnlyList<bool>` return was needless ceremony. `AssertHandledAsync` now owns the assertion — it returns once the variable reports `$true` and otherwise fails via `Assert.Fail` when the ~15s poll window elapses, which reads as "the OnIdle handler never ran." `Assert.Fail` is fine here — we're on xUnit 2.9.3 and already use it in the E2E tests. No behavior change to what's being verified; the call sites just shrink to a single `await OnIdleTestHelpers.AssertHandledAsync(...)`. Still green on net8.0. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Assert `OnIdle` poll result with `Assert.True` Follow-up to review feedback: the helper short-circuited with a bare `return` on success and only asserted (`Assert.Fail`) on timeout, so the happy path had no explicit assertion. Restructure the loop to poll until the handler variable is `$true` or the ~15s window elapses, then assert the outcome once with `Assert.True(handled, ...)`. Same behavior, but the success and timeout paths now share a single, self-describing assertion. Still green on net8.0. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
We had no `.github/copilot-instructions.md`, so agents working in this repo had to rediscover how to build and test, how the projects fit together, and how we label pull requests. This adds a single instructions file covering all of it: - **Build & Test** — `dotnet` directly for the fast inner loop versus `Invoke-Build` (which needs `InvokeBuild`/`platyPS`) for assembling the full module and running the complete CI suite. - **Architecture** — the project layout, key services, the LSP/DAP handler pattern, and how the server is wired up. - **Conventions** — C# style enforced by `.editorconfig`, the xUnit testing setup, and the multi-targeting story. - **Pull Request Labels** — every PR needs at least one `Area-*` label and exactly one `Issue-*` label (plus `OS-*` and `Ignore` when relevant). The `Issue-*` label is what GitHub's auto-generated release notes key off of (see `.github/release.yml`); a PR without one silently falls through to "Other Changes 🙏". The build, architecture, and conventions content previously rode along in #2298; consolidating it here keeps that PR focused on its LSP changes and gives us a single source of truth for the instructions. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Initial plan * Update GitHub Actions: checkout v6→v7, upload-artifact v5→v7 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
On macOS and Linux, dot files are hidden, so `Get-ChildItem` skips them unless `-Force` is passed. This meant `psedit ~/.zshrc` (and similar) silently opened nothing, making the alias useless for exactly the kind of config files people most often want to jump into. Add `-Force` to the `Get-ChildItem` call in `Open-EditorFile` so hidden files resolve and open. The issue notes a wrinkle: with `-Force`, passing a *directory* would now also enumerate its hidden files. I think that's an acceptable trade-off for the common path-to-a-file case, and a draft for maintainer review either way. Fixes #1750. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ression); cap CI job (#2318) * Reduce CI test timeout and fix busy-spin in `ReadScriptLogLineAsync` The `CanAttachScriptWithPathMappings` E2E test intermittently hung `windows-latest` CI for the full six-hour default — three of the last eleven `main` runs died this way, all the same test, interspersed with green runs (a classic flaky race, not a regression). None of the commits whose runs hung touched the debugger attach path. The hang mechanism lived in `ReadScriptLogLineAsync`: at EOF `StreamReader.ReadLineAsync()` completes *synchronously* with `null`, so the `while`/`await` polling loop never actually yielded. It busy-spun one CPU at 100%, which starved the scheduler so none of the existing cooperative safety nets — xUnit's `[SkippableFact(Timeout = 15000)]`, the 30s `debugTaskCts`, or `WaitForExitAsync` — could ever schedule their continuations. A flaky few-second race thus escalated into a six-hour wedge. Ironically the busy-loop landed in #2208, a PR meant to reduce flakiness, and lay dormant until #2251 added a Windows-racy attach test that actually hits the EOF spin. - Back off with `await Task.Delay(100, token)` on EOF so we yield instead of busy-spinning, and cap the whole read with a 15s linked CTS that throws a clear `TimeoutException` naming the log path. - Add `timeout-minutes: 15` to the `ci` job as a backstop so any future hang fails in 15 minutes instead of riding GitHub's 6-hour default. A normal run finishes well under that (Windows, the slowest, is ~12-14m). The underlying attach race (reflection-based wait for `Debug-Runspace` to subscribe) is still worth hardening, but it now fails fast instead of hanging. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Revert "Match strong-name identity when resolving PSES dependencies (#2303)" This reverts commit b9fd1b3. #2303 is what broke `CanAttachScriptWithPathMappings` on Windows. A clean bisection shows its parent (#2304, 6ad4f46) passed Windows E2E in ~12 minutes, while #2303 itself hung for 5h51m on that exact test -- and every commit built on top of it inherited the hang. Months of green Windows runs precede #2303. The mechanism is in `PsesLoadContext.Load`. #2303 tightened `IsSatisfyingAssembly` to also require a matching public key token and culture. When a `$PSHOME` assembly previously satisfied a dependency by name+version, `Load` returned `null` and PSES *shared* PowerShell's single copy. Under the stricter check a token mismatch now fails that first test, so `Load` falls through and loads our *own* bundled copy into the isolated `PsesLoadContext` instead -- producing two copies of the same assembly in two load contexts and a split type identity. The debugger-attach handshake (`Debug-Runspace` subscribing to `RunspaceBase.AvailabilityChanged`, plus the stopped-event plumbing in SMA) relies on cross-context event wiring that silently breaks under such a split, so the attach never completes and the test waits forever. It only trips on Windows because that is where the `$PSHOME`-versus-bundled token divergence occurs. #2303's "no bundled dependency changes resolution" check was static and missed an assembly loaded dynamically during attach. #2303 was self-described as "a focused trial of tightening" the matching, so reverting it restores the long-standing, known-good behavior. We can re-attempt the hardening later with this attach test as a guard. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Bump CI timeout backstop to 30 minutes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Lower `ReadScriptLogLineAsync` cap below per-test xUnit timeout The internal `CancelAfter` cap was 15s, exactly equal to the `[SkippableFact(Timeout = 15000)]` on `CanAttachScriptWithPathMappings`. Because xUnit's per-test timer covers the whole test -- attach, setBreakpoints, configurationDone and waiting for stopped events all run before `ReadScriptLogLineAsync` is even entered -- xUnit's generic timeout would almost always fire first, so the descriptive `TimeoutException` naming the log path would never surface for the very test that motivated it. Drop the cap to 10s so the clearer message can win for that test, while still bounding the untimed `[Fact]` callers. Per review feedback from copilot-pull-request-reviewer on #2318. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Restore #2303 and test helper, keeping only the CI timeout backstop Reduce this branch to its one honest, effective change: a 30-minute `timeout-minutes` on the CI test job. A normal run finishes well under that (Windows, the slowest, is ~12-14 minutes), so the cap only bounds a hung test instead of letting it ride GitHub's 6-hour default. This un-reverts #2303 and drops the earlier `ReadScriptLogLineAsync` change, both of which were based on a per-commit bisection that has since been disproven. The Windows debugger-attach test `CanAttachScriptWithPathMappings` intermittently wedges on the attach handshake and rides the default timeout; the same hang reproduces on `main` (which contains #2303) and reproduced here with #2303 reverted, so #2303 is not the cause and is restored. The attach test wedges before it ever reaches `ReadScriptLogLineAsync`, so that change could not affect the hang and its short internal cap risked introducing new flakiness on a slow-but-healthy attach; it is reverted too. The intermittent attach hang is tracked separately. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix thread-pool starvation that wedged attach E2E test CanAttachScriptWithPathMappings intermittently hung Windows CI for hours instead of failing fast. Its ReadScriptLogLineAsync tailed the script log with `while (...) await ReadLineAsync()`, but at EOF ReadLineAsync completes synchronously with null, so the loop never released its thread-pool thread. On constrained CI runners that starved the pool, which both wedged the DAP client's background I/O and prevented the xUnit (15s) and harness (30s) timeout continuations from ever running -- so a transient stall rode the job timeout for hours. Await a short delay between reads so the tail loop yields, and add a matching sleep to the child process's Debug-Runspace readiness poll so it cannot peg a core during the attach handshake. Combined with the 30-minute CI job cap, a genuine stall now fails fast via the test's own timeout instead of hanging. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Skip attach E2E test on in-box Windows PowerShell CanAttachScriptWithPathMappings hangs on in-box Windows PowerShell 5.1 since the windows-2025-vs2026 runner image refreshed from 20260608 to 20260614. The cross-process Debug-Runspace attach wedges and the test rides the job timeout; the windows-latest leg cannot complete. Scope the skip to IsWindowsPowerShell so the in-box WinPS suites (including CLM) are exempt while PowerShell Core, the preview, macOS, and Linux keep full coverage of the attach path. This is a stopgap pending a real fix for the in-box attach deadlock, tracked by #2323; the 30-minute timeout-minutes backstop in ci-test.yml stays as a guard. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Soften ReadScriptLogLineAsync comment to match root cause The earlier comment asserted the EOF tight-loop was the cause of the multi-hour Windows hang. Deconfounding analysis disproved that: the hang is the in-box Windows PowerShell attach regression from the 20260614 runner image, not thread-pool starvation here. Keep the yield as genuine harness hardening but describe it as such rather than claiming it as the fix. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Skip attach E2E test at discovery time on Windows PowerShell CanAttachScriptWithPathMappings wedges during the per-test InitializeAsync (PSES debug-adapter server startup) on in-box Windows PowerShell since the windows-2025-vs2026 runner image refresh, riding the job timeout in CI. The prior in-body Skip.If(IsWindowsPowerShell) never fired because xUnit runs IAsyncLifetime.InitializeAsync before the test body, and that setup is where the hang occurs. Add a SkippableFact subclass that sets Skip in its constructor so xUnit skips the test at discovery time, before it instantiates the class or runs InitializeAsync. The SkippableFact discoverer is retained so the runtime Constrained Language Mode skip still works off-Windows. See #2323. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * ci: raise test job timeout to 60 minutes The 30-minute cap was too aggressive as a backstop; bump it to 60 so a genuinely slow (but not hung) run is not killed prematurely, while still capping a wedged test well short of GitHub's 6-hour default. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Skip all debug adapter E2E tests on Windows PowerShell The CI hang is in the shared per-test InitializeAsync that starts the PSES debug-adapter server, not in any single test, so skipping only CanAttachScriptWithPathMappings just promotes the next test to first victim. Each test pays a fresh cold-start, and intermittently any one of them can be the test that wedges on the 20260614 runner image. Broaden the discovery-time Windows PowerShell skip to the entire DebugAdapterProtocolMessageTests class: add a SkippableTheory companion to the existing SkippableFact variant, share the skip reason, and apply the attributes to all test methods. The pwsh (.NET 8) E2E suite still runs the full set, so only in-box Windows PowerShell debug-adapter coverage is paused, pending a real fix tracked in #2323. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Skip all language server E2E tests on Windows PowerShell The in-box Windows PowerShell server wedges during startup on the current windows-latest runner image, riding the job timeout. This is a runner-image regression, not our code: re-running an old commit that predates all of our recent PRs (and previously passed) now hangs the same way, while macOS and Linux stay green. Because both E2E suites spawn the same WinPS-hosted server, skipping only the debug adapter tests just relocated the hang to the language server fixture's `LSPTestsFixture.InitializeAsync`, where `_psesHost.Start()` launches the server. - Apply the discovery-time `[SkippableFactOnWindowsPowerShell]` skip to every test method in `LanguageServerProtocolMessageTests`. - Guard `LSPTestsFixture` so it does not start the server under Windows PowerShell, and dispose safely when it wasn't started. xUnit still creates an `IClassFixture<>` even when every method in the class is skipped at discovery time, so the discovery-time skip alone does not stop the fixture's own startup from hanging. - Generalize the shared skip reason from `WindowsPowerShellDebugAdapterSkip` to `WindowsPowerShellServerStartupSkip`, since it now covers both protocols. Windows PowerShell unit coverage (`TestPS51`) still runs; this only skips the WinPS-hosted E2E server tests as a stopgap pending a real fix. See #2323. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…n permissions (#2320) Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…n permissions (#2322) Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…n permissions (#2321) Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…mpat (#2319) * Restore concrete `FileRange` overloads on `FileContext` #2306 widened the parameters of `FileContext.GetText` and `GetTextLines` from the concrete `FileRange` class to the `IFileRange` interface so that `$Context.CurrentFile.GetText($Context.SelectedRange)` would resolve (since `SelectedRange` is typed as `IFileRange`). That fixed the script-side call, but it dropped the old concrete-typed method slots from the assembly. Downstream modules that compile against PSES, most notably SeeminglyScience/EditorServicesCommandSuite, bind to the published metadata at build time. A precompiled caller of the old `GetText(FileRange)` signature would throw `MissingMethodException` at runtime even though it recompiles cleanly, so this was a binary-breaking change. Restore `GetText(FileRange)` and `GetTextLines(FileRange)` alongside the `IFileRange` overloads. Each casts to `IFileRange` and delegates to the widened implementation, so old binaries keep resolving and behavior is unchanged. The added tests declare their argument as the concrete `FileRange` so overload resolution actually exercises the compatibility shims. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Document public API binary-compatibility rules for Copilot I missed that #2306 was binary-breaking until after it merged, so add a "Public API & Binary Compatibility" section to the Copilot instructions to catch the next one at review time. The key context the agent was missing: the public types under `Microsoft.PowerShell.EditorServices` aren't only reached through PowerShell script. Downstream modules compile against the shipped assemblies, and SeeminglyScience/EditorServicesCommandSuite in particular references the extension API surface (`FileContext`, `IFileRange`, `ILspCurrentFileContext`, `IEditorScriptFile`, ...) directly from C#. So widening or renaming an existing `public` member is source-compatible at most but binary-breaking. The section spells out the failure mode (`MissingMethodException`), the fix (add an overload that delegates rather than editing the signature in place), and the expectation to bind a regression test to the old concrete signature. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…#2328) * Fix Windows PowerShell host-start hang in `SetCorrectExecutionPolicy` On recent in-box Windows PowerShell 5.1 servicing builds, the language and debug servers intermittently hang on startup and ride the CI job timeout (#2323). The wedge is `SetCorrectExecutionPolicy`: it calls `Microsoft.PowerShell.Security\Get-ExecutionPolicy -List`, which autoloads `Microsoft.PowerShell.Security` into the freshly created runspace. That runspace's `InitialSessionState` is reused from the host runspace and already carries the module's `ObjectSecurity` type data, so re-binding it throws "The member `AuditToString` is already present". `PsesInternalHost.Run()` catches it, faults `_started`, and the pipeline thread exits — but `TryStartAsync` is still awaiting queued startup tasks that now never run, so it hangs forever. Configuring the execution policy is best-effort, so we wrap the `Get-ExecutionPolicy` query in try/catch (mirroring the existing `Set-ExecutionPolicy` handling just below it) and skip policy configuration when it fails, rather than letting a type-data hiccup abort host startup. I also guard the subsequent indexing against a short result list. With the hang fixed we no longer need the in-box Windows PowerShell E2E skips added in #2318, so this reverts them: the `SkippableFactOnWindowsPowerShell` attributes, the `LSPTestsFixture` early-return, and the two attribute files. The DAP suite passes clean under `powershell.exe`. Three LSP help tests (`Expand-Archive` synopsis) still fail locally on my older servicing build (.8655); they pass under `pwsh`, so I'm letting CI judge them on its build rather than re-skipping. The `ci-test.yml` job timeout from #2318 stays as a backstop. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Restore E2E test hardening reverted with the Windows PowerShell skips PR #2328 reset the three E2E test files to their pre-#2318 state (`b57653c40`) to undo the Windows PowerShell skips we no longer want now that the host-start hang is actually fixed. But #2318 was a squash that bundled genuine harness hardening *alongside* those skips, so reverting wholesale quietly dropped the good parts too. Restore just those, keeping the skips reverted: - `ReadScriptLogLineAsync` now yields with `await Task.Delay(100)` at EOF instead of busy-spinning. At EOF `ReadLineAsync` completes synchronously with `null`, so the old `while`/`await` loop never released its thread-pool thread and could starve the scheduler on constrained CI runners. - The child-process `Debug-Runspace` readiness poll in `CanAttachScriptWithPathMappings` sleeps 100ms per iteration so it can't peg a core during the attach handshake. - `LSPTestsFixture.DisposeAsync` guards against a null `PsesLanguageClient` so a startup failure isn't masked by a `NullReferenceException` during teardown. These are defense-in-depth independent of the skips, and they matter more now that we un-skip: a Windows PowerShell server that fails to start shouldn't busy-spin or NRE on teardown. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fail fast when the debug adapter's `OnInitialize` delegate throws OmniSharp's `DebugAdapterServer.From()` (0.19.9) awaits an internal `AsyncSubject` that its `InitializeRequest` handler only signals on the success path. If an `OnInitialize` delegate throws, the handler faults before signaling, nothing errors the subject, and `From()` -- and thus `PsesDebugServer.StartAsync()` -- awaits it forever. So a startup failure wedges the entire debug server and rides the CI/job timeout instead of failing fast. This is a library limitation, not our bug: the same code is present on the library's `master`, so we can't fix it upstream without a fork or upgrade. #2328 fixes the specific trigger we hit on in-box Windows PowerShell (the `Get-ExecutionPolicy -List` type-data conflict), but the wedge mechanism is generic. Guard against any future `OnInitialize` failure: wrap the delegate body, log the exception, and signal `_serverStopped` so `WaitForShutdown` unblocks and the process exits cleanly. `Dispose`'s `_serverStopped` completion is now idempotent (`TrySetResult`) since the catch may have already completed it. This converts a silent multi-hour hang into a clean termination with a logged error -- the client sees the session end instead of waiting forever. See #2323. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Increase `CanAttachScriptWithPathMappings` timeouts on slow CI runners This PR un-skips `CanAttachScriptWithPathMappings` on Windows PowerShell (reverting the #2318 skips now that the host-start hang is fixed), and the un-skipped test promptly failed on the WinPS 5.1 CI leg with "Attached process exited before the script could start" -- at exactly 10 seconds. The test spawns a child `powershell.exe`, then waits up to 10s for `Debug-Runspace` to subscribe to the child's runspace as the marker that the attach handshake completed, before driving a full breakpoint/continue interaction under a 15s xUnit timeout. On the 2-vCPU CI runners the WinPS attach alone exceeds that 10s budget, so the child throws its internal timeout and exits before the debug session attaches. It isn't even close to comfortable locally: xUnit flags the run as a long-running test at the 10s mark on a fast dev box, so the old budget was always on a knife's edge for the slower WinPS path. Rather than re-skip it, give the slow-but-correct path room: - The child's `Debug-Runspace` subscription poll goes 10s -> 30s. - The outer process-watch cancellation goes 30s -> 60s. - The xUnit `Timeout` goes 15s -> 60s. This continues 81b273b (which already bumped the xUnit timeout 10s -> 15s for the same flakiness) and keeps real coverage of the attach path on Windows PowerShell instead of skipping it. See #2323 and #2318. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Skip the attach and prefixed-completion E2E tests on Windows PowerShell Un-skipping the entire Windows PowerShell E2E suite (now that the host-start hang is fixed) gave us real WinPS coverage for the first time since #2318, but it also surfaced two pre-existing WinPS-specific failures that have nothing to do with host startup: - `CanAttachScriptWithPathMappings` wedges on the in-box, cross-process `Debug-Runspace` attach handshake and rides whatever timeout we set. CI failed it at 10s, then again at exactly 30s after I bumped the budgets, so it genuinely never completes rather than merely running slow. This is the in-box attach deadlock tracked by #2323. - `CanSendCompletionResolveWithModulePrefixRequestAsync` gets an empty completion list from the Windows PowerShell server for a prefix-imported command (it fails before any help assertion, so it's help-independent). That's the same "completion works in PS7 but not WinPS" family as #1355. Because startup no longer hangs, we don't need #2318's discovery-time `[SkippableFactOnWindowsPowerShell]` attribute anymore: an in-body `Skip.If(IsWindowsPowerShell, ...)` runs after `InitializeAsync` (which now starts the server fine) and skips before the broken code, so both tests skip cleanly in ~1ms under `powershell.exe` instead of hanging or failing. This also reverts my earlier timeout bump on `CanAttachScriptWithPathMappings` (back to the 15s/10s/30s budgets from `main`) since the bigger budgets didn't help and the test no longer runs on Windows PowerShell anyway. Everything else stays un-skipped. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Skip the flaky child-attach-session E2E test on Windows PowerShell Un-skipping the Windows PowerShell E2E suite surfaced one more attach-family flake: `CanLaunchScriptWithNewChildAttachSession`. It passed on the prior CI run (`a4e8a823e`) but timed out (`TaskCanceledException` at its 30s budget) on the next (`25d9e58dd`) with no relevant code change in between, so it's genuinely flaky on the slow in-box Windows PowerShell CI runners rather than broken. The test runs `Start-DebugAttachSession` and waits for the server's `startDebugging` reverse-request round-trip; on in-box Windows PowerShell that round-trip is slow enough to intermittently miss the timeout. That's the same in-box attach-E2E reliability bucket as #2323, and its two siblings are already skipped there: `CanAttachScriptWithPathMappings` (the cross-process `Debug-Runspace` wedge) and `CanLaunchScriptWithNewChildAttachSessionAsJob` (no `ThreadJob` on Windows PowerShell). So skip this one on Windows PowerShell too, keeping the rest of the now-un-skipped DAP suite running. The flake only reproduces on the constrained CI runner, not on a fast dev box, so I'm matching how the sibling attach tests are handled rather than chasing a timeout bump I can't validate locally. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Initial plan * fix: preserve splat sigil during rename --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Convert `powerShell/showHelp` from a fire-and-forget notification into a
request that returns `ShowHelpResult { HelpText }`, so the client can render
help in a read-only editor pane (and the language model `get_help` tool can
reuse the same path) instead of printing into the integrated console.
The handler captures `Get-Help -Full | Out-String` and `.Trim()`s both ends —
`Out-String` pads the output with a leading and trailing blank line, which
looked wrong in the help pane and in tool output.
Drafted by Copilot (Claude Opus 4.8).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The handler previously serialized the entire command table (names, modules, and full parameter metadata) on every request, which is slow enough to hang the `get_command` language model tool and made the Command Explorer take minutes to populate. Extend `GetCommandParams` so callers can ask for only what they need: - `Name`/`Module` (both wildcard-capable) scope the `Get-Command` call so we don't materialize everything; an unmatched filter writes a non-terminating error, so we pass `-ErrorAction Ignore` and return an empty list instead. - `ExcludeParameters` takes a fast path that returns just name, module, and the new `ModuleVersion` without touching `Parameters`/`ParameterSets`, whose resolution and serialization dominate the cost. - Editor-injected commands are always skipped: the PSES host's fake `PSConsoleHostReadLine` (version 0.0.0) and VS Code's shell-integration helpers (`__VSCode-Escape-Value`, `Set-MappedKeyHandler[s]`) are plumbing, not commands a user authored or imported. - `ExcludeDefaultFunctions` (opt-in) drops PowerShell's module-less default-session functions (`cd..`, `prompt`, `TabExpansion2`, ...) and the install's `pwsh.profile.resource` script. The names come from `InitialSessionState.CreateDefault2()` so the list stays correct across PowerShell versions; module-provided commands are never affected. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The Command Explorer groups commands under versioned module nodes and shows a tooltip on hover. Add a `getModule` request that returns a single module's metadata (version, description, path, author, company, project URI, required PowerShell version) so the client can populate those tooltips lazily, and register the handler in `PsesLanguageServer`. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Merging #2328 un-skipped the Windows PowerShell E2E suite, which surfaced a pre-existing host gap in `CanSendGetModuleRequestAsync`: it probed `Microsoft.PowerShell.Management`, but Windows PowerShell's in-box core modules are snap-in based and are not returned by `Get-Module -ListAvailable`. The handler correctly resolved nothing, so `Assert.NotNull` failed on the Windows PowerShell leg while passing on PowerShell 7 (where the core modules ship as files). Probe `Microsoft.PowerShell.Archive` instead: it is a file-based module present in the module path on both Windows PowerShell and PowerShell 7+, so the test exercises the handler on every host without skipping or loosening any assertion. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The `TestE2EPowerShell` build task launches the server with `$env:PSModulePath = ''` (the vscode-powershell#3886 workaround for inheriting `powershell.exe`'s module path). PSES's `UpdatePSModulePath()` then appends the bundled module directory, so the runspace ends up with `;<bundled>` — a non-empty path. That distinction matters: Windows PowerShell only auto-injects its default module locations (`$PSHOME\Modules`, etc.) when `PSModulePath` is empty. The moment it's non-empty, no defaults are added, so `Get-Module -ListAvailable` finds nothing and `powerShell/getModule` returns null for every module — not just `Microsoft.PowerShell.Archive`. I confirmed this by probing `powershell.exe` directly: an empty path resolves the module, while any non-empty path (including the leading-`;` shape PSES produces) does not. pwsh 7 isn't affected because `TestE2EPwsh` never clears the path, and real VS Code sessions always have a populated `PSModulePath`, so the feature works in practice. This is a test-host artifact, not a product bug, so skip both getModule tests on the in-box Windows PowerShell leg: - `CanSendGetModuleRequestAsync` was failing outright (null module). - `CanSendGetModuleRequestForMissingModuleAsync` was passing vacuously — it asserts null, which every module now returns — so it validated nothing on this leg. Promote it from `[Fact]` to `[SkippableFact]` and skip it too. Both still run on Linux, macOS, and the PowerShell 7 Windows legs. This mirrors the earlier `73293931e` skip that was reverted when we tried the "probe Archive without skipping" approach, which the harness's emptied `PSModulePath` makes unworkable. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ers, and fix a Windows PowerShell host-start hang. (#2329)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- Reword - Add command including all required parameters - Add additional tips to set up PSES in some editors
There was a problem hiding this comment.
Pull request overview
Synchronizes the fork with upstream main, incorporating the 4.7.0 release, new editor capabilities, debugging improvements, and updated build infrastructure.
Changes:
- Adds rename support, workspace document state, semantic-token enhancements, and debugger improvements.
- Modernizes dependencies, .NET targets, test infrastructure, and CI workflows.
- Removes obsolete templating, E2E process, notice, and build files.
Reviewed changes
Copilot reviewed 250 out of 261 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
tools/updateVersion.ps1 |
Adds release links to changelogs. |
tools/installPSResources.ps1 |
Migrates resource installation. |
Third Party Notices.txt |
Removes obsolete notices. |
test/vim-test.vim |
Revises Vim diagnostics test. |
test/vim-simple-test.vim |
Revises simple Vim test. |
test/PowerShellEditorServices.Test/Utility/AstExtensionsTests.cs |
Tests function keyword offsets. |
test/PowerShellEditorServices.Test/Session/WorkspaceTests.cs |
Tests invalid workspace folders. |
test/PowerShellEditorServices.Test/Services/Symbols/PSScriptAnalyzerTests.cs |
Updates nullable argument usage. |
test/PowerShellEditorServices.Test/Refactoring/RefactorUtilities.cs |
Adds rename edit utilities. |
test/PowerShellEditorServices.Test/PsesHostFactory.cs |
Makes host creation asynchronous. |
test/PowerShellEditorServices.Test/PowerShellEditorServices.Test.csproj |
Updates test targets and dependencies. |
test/PowerShellEditorServices.Test/Language/SemanticTokenTest.cs |
Expands semantic-token coverage. |
test/PowerShellEditorServices.Test/Language/FoldingReferenceEqualityTests.cs |
Adds equality regression tests. |
test/PowerShellEditorServices.Test/Language/CompletionHandlerTests.cs |
Updates lifecycle and tooltip tests. |
test/PowerShellEditorServices.Test/Extensions/FileContextTests.cs |
Tests range API compatibility. |
test/PowerShellEditorServices.Test/Extensions/ExtensionCommandTests.cs |
Modernizes async test setup. |
test/PowerShellEditorServices.Test/Extensions/EditorOperationsServiceTests.cs |
Tests open-document state. |
test/PowerShellEditorServices.Test.Shared/SymbolDetails/SymbolDetails.ps1 |
Updates symbol fixtures. |
test/PowerShellEditorServices.Test.Shared/Refactoring/Variables/* |
Adds variable rename fixtures and cases. |
test/PowerShellEditorServices.Test.Shared/Refactoring/Utilities/* |
Adds refactoring utility fixtures. |
test/PowerShellEditorServices.Test.Shared/Refactoring/RenameTestTarget.cs |
Defines rename test metadata. |
test/PowerShellEditorServices.Test.Shared/Refactoring/Functions/* |
Adds function rename fixtures and cases. |
test/PowerShellEditorServices.Test.Shared/PSHelp/README |
Documents offline test help. |
test/PowerShellEditorServices.Test.Shared/PSHelp/*HelpInfo.xml |
Adds offline help metadata. |
test/PowerShellEditorServices.Test.Shared/Debugging/VariableScopeTest.ps1 |
Adds scope fixture. |
test/PowerShellEditorServices.Test.Shared/Completion/CompletionExamples.psm1 |
Updates completion examples. |
test/PowerShellEditorServices.Test.Shared/Completion/CompleteCommandInFile.cs |
Updates expected completion. |
test/PowerShellEditorServices.Test.E2E/xunit.runner.json |
Enables conservative parallel testing. |
test/PowerShellEditorServices.Test.E2E/Processes/PsesStdioProcess.cs |
Removes legacy process host. |
test/PowerShellEditorServices.Test.E2E/Processes/LoggingStream.cs |
Removes legacy logging stream. |
test/PowerShellEditorServices.Test.E2E/PowerShellEditorServices.Test.E2E.csproj |
Centralizes E2E dependencies. |
test/PowerShellEditorServices.Test.E2E/LSPTestsFixtures.cs |
Uses the new process host. |
test/PowerShellEditorServices.Test.E2E/Hosts/PsesStdioLanguageServerProcessHost.cs |
Adds PSES stdio host. |
test/PowerShellEditorServices.Test.E2E/Hosts/IDebugAdapterClientExtensions.cs |
Adds debug launch helper. |
test/PowerShellEditorServices.Test.E2E/Hosts/IAsyncLanguageServerHost.cs |
Defines async host contract. |
test/PowerShellEditorServices.Test.E2E/Hosts/DebugOutputStream.cs |
Adds protocol stream logging. |
test/PowerShellEditorServices.Test.E2E/DebugAdapterClientExtensions.cs |
Removes old launch helper. |
test/emacs-test.el |
Waits dynamically for diagnostics. |
src/PowerShellEditorServices/Utility/PSCommandExtensions.cs |
Supports alternate execution operators. |
src/PowerShellEditorServices/Utility/LspDebugUtils.cs |
Relocates stack-frame construction. |
src/PowerShellEditorServices/Utility/AsyncUtils.cs |
Adds analyzer suppression. |
src/PowerShellEditorServices/Services/Workspace/RemoteFileManagerService.cs |
Updates async suppressions and cleanup. |
src/PowerShellEditorServices/Services/Workspace/LanguageServerSettings.cs |
Adds enum alignment setting. |
src/PowerShellEditorServices/Services/Workspace/Handlers/ConfigurationHandler.cs |
Removes extra whitespace. |
src/PowerShellEditorServices/Services/TextDocument/TokenOperations.cs |
Removes obsolete suppression. |
src/PowerShellEditorServices/Services/TextDocument/ScriptFile.cs |
Tracks dirty and open state. |
src/PowerShellEditorServices/Services/TextDocument/Handlers/TextDocumentHandler.cs |
Updates save and close behavior. |
src/PowerShellEditorServices/Services/TextDocument/Handlers/RenameHandler.cs |
Adds LSP rename handlers. |
src/PowerShellEditorServices/Services/TextDocument/Handlers/PsesSemanticTokensHandler.cs |
Adds decorator and label tokens. |
src/PowerShellEditorServices/Services/TextDocument/Handlers/FormattingHandlers.cs |
Qualifies text-edit types. |
src/PowerShellEditorServices/Services/TextDocument/Handlers/DidChangeWatchedFilesHandler.cs |
Suppresses library nullability warning. |
src/PowerShellEditorServices/Services/TextDocument/Handlers/CompletionHandler.cs |
Extracts completion documentation. |
src/PowerShellEditorServices/Services/TextDocument/FoldingReference.cs |
Corrects comparison and equality. |
src/PowerShellEditorServices/Services/Template/Handlers/TemplateHandlers.cs |
Removes template handlers. |
src/PowerShellEditorServices/Services/Template/Handlers/ITemplateHandlers.cs |
Removes template RPC contracts. |
src/PowerShellEditorServices/Services/Symbols/SymbolsService.cs |
Simplifies code-lens construction. |
src/PowerShellEditorServices/Services/Symbols/ReferenceTable.cs |
Converts field to property. |
src/PowerShellEditorServices/Services/PowerShell/Refactoring/Exceptions.cs |
Adds rename exceptions. |
src/PowerShellEditorServices/Services/PowerShell/Host/HostStartOptions.cs |
Configures shell integration scripts. |
src/PowerShellEditorServices/Services/PowerShell/Handlers/HandlerErrorException.cs |
Adds user-facing RPC exception. |
src/PowerShellEditorServices/Services/PowerShell/Handlers/ExpandAliasHandler.cs |
Reimplements alias expansion. |
src/PowerShellEditorServices/Services/PowerShell/Execution/SynchronousTask.cs |
Converts fields to properties. |
src/PowerShellEditorServices/Services/PowerShell/Debugging/PowerShellDebugContext.cs |
Stabilizes stop-event access. |
src/PowerShellEditorServices/Services/PowerShell/Debugging/IPowerShellDebugContext.cs |
Simplifies interface declarations. |
src/PowerShellEditorServices/Services/PowerShell/Debugging/DscBreakpointCapability.cs |
Returns DSC module names only. |
src/PowerShellEditorServices/Services/PowerShell/Console/LegacyReadLine.cs |
Updates analyzer suppression. |
src/PowerShellEditorServices/Services/Extension/EditorOperationsService.cs |
Exposes open documents. |
src/PowerShellEditorServices/Services/DebugAdapter/PathMapping.cs |
Adds path-mapping record. |
src/PowerShellEditorServices/Services/DebugAdapter/Handlers/VariablesHandler.cs |
Suppresses broad-catch warning. |
src/PowerShellEditorServices/Services/DebugAdapter/Handlers/ScopesHandler.cs |
Maps artificial stack frames. |
src/PowerShellEditorServices/Services/DebugAdapter/Handlers/DisconnectHandler.cs |
Cleans debug state. |
src/PowerShellEditorServices/Services/DebugAdapter/Handlers/ConfigurationDoneHandler.cs |
Supports call execution mode. |
src/PowerShellEditorServices/Services/DebugAdapter/Handlers/BreakpointHandlers.cs |
Applies remote path mappings. |
src/PowerShellEditorServices/Services/DebugAdapter/DebugStateService.cs |
Tracks execution mode. |
src/PowerShellEditorServices/Services/DebugAdapter/Debugging/BreakpointDetails.cs |
Tracks mapped breakpoint sources. |
src/PowerShellEditorServices/Services/DebugAdapter/Debugging/BreakpointApiUtils.cs |
Uses mapped breakpoint paths. |
src/PowerShellEditorServices/Services/CodeLens/ReferencesCodeLensProvider.cs |
Removes unused workspace dependency. |
src/PowerShellEditorServices/Services/Analysis/AnalysisService.cs |
Improves multi-root settings lookup. |
src/PowerShellEditorServices/Server/PsesServiceCollectionExtensions.cs |
Registers rename services. |
src/PowerShellEditorServices/PowerShellEditorServices.csproj |
Centralizes dependencies and analyzers. |
src/PowerShellEditorServices/Logging/HostLoggerAdapter.cs |
Simplifies logger adapter. |
src/PowerShellEditorServices/IsExternalInit.cs |
Adds license header. |
src/PowerShellEditorServices/Hosting/HostStartupInfo.cs |
Modernizes profile-path data. |
src/PowerShellEditorServices/GlobalSuppressions.cs |
Removes global suppression. |
src/PowerShellEditorServices/Extensions/IEditorOperations.cs |
Adds workspace document API. |
src/PowerShellEditorServices/Extensions/FileContext.cs |
Widens file-range APIs. |
src/PowerShellEditorServices/Extensions/EditorWorkspace.cs |
Exposes document operations. |
src/PowerShellEditorServices/Extensions/EditorWindow.cs |
Adds analyzer suppressions. |
src/PowerShellEditorServices/Extensions/EditorObject.cs |
Updates synchronous API suppression. |
src/PowerShellEditorServices/Extensions/EditorFileRanges.cs |
Removes redundant equality interfaces. |
src/PowerShellEditorServices/Extensions/EditorContext.cs |
Updates analyzer suppression. |
src/PowerShellEditorServices.Hosting/PowerShellEditorServices.Hosting.csproj |
Targets .NET 8 and central packages. |
src/PowerShellEditorServices.Hosting/Internal/PsesLoadContext.cs |
Strengthens assembly identity matching. |
src/PowerShellEditorServices.Hosting/Configuration/TransportConfig.cs |
Updates transport log levels. |
src/PowerShellEditorServices.Hosting/Configuration/SessionFileWriter.cs |
Updates session log levels. |
src/PowerShellEditorServices.Hosting/Configuration/EditorServicesConfig.cs |
Changes default logging level. |
SECURITY.md |
Adds vulnerability-reporting policy. |
PowerShellEditorServices.Common.props |
Bumps version and removes lockfiles. |
nuget.config |
Changes package feed. |
modules.json |
Removes legacy module manifest. |
module/PowerShellEditorServices/Start-EditorServices.ps1 |
Maps legacy log levels. |
module/PowerShellEditorServices/PowerShellEditorServices.psd1 |
Bumps module version. |
module/PowerShellEditorServices/Commands/Public/CmdletInterface.ps1 |
Includes hidden files when opening. |
module/PowerShellEditorServices/Commands/PowerShellEditorServices.Commands.psd1 |
Exports attach command. |
module/docs/PowerShellEditorServices.Commands.md |
Documents attach command. |
global.json |
Moves to .NET 10 SDK. |
docs/guide/getting_started.md |
Updates Neovim guidance. |
Directory.Packages.props |
Adds central package versions. |
Directory.Build.props |
Enables central package management. |
CODE_OF_CONDUCT.md |
Updates conduct policy. |
build.ps1 |
Removes legacy build wrapper. |
ADOPTERS.md |
Removes obsolete adopters list. |
.gitignore |
Replaces ignore rules. |
.github/workflows/vim-test.yml |
Pins actions and updates Vim. |
.github/workflows/emacs-test.yml |
Pins actions and updates caching. |
.github/workflows/codeql-analysis.yml |
Removes CodeQL workflow. |
.github/workflows/close-stale-issues.yml |
Pins stale action. |
.github/release.yml |
Updates excluded author. |
.github/dependabot.yml |
Limits updates to GitHub Actions. |
.git-blame-ignore-revs |
Adds formatting revisions. |
.editorconfig |
Tightens analyzer severities. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+111
to
+116
| $LogLevel = switch ($LogLevel) { | ||
| 'Diagnostic' { 'Trace' } | ||
| 'Verbose' { 'Debug' } | ||
| 'Normal' { 'Information' } | ||
| default { $LogLevel } | ||
| } |
Comment on lines
+342
to
+345
| if (!IsValidFunctionName(newName)) | ||
| { | ||
| throw new HandlerErrorException($"{newName} is not a valid function name."); | ||
| } |
| await _psesProcess.Stop(); | ||
| } | ||
| client?.Dispose(); | ||
| psesHost.Stop(); |
Comment on lines
+52
to
+62
| let l:actual_diagnostics = {} | ||
| for l:attempt in range(1, 30) | ||
| let l:actual_diagnostics = getbufvar(l:bufinfo.bufnr, 'LanguageClient_statusLineDiagnosticsCounts') | ||
| if type(l:actual_diagnostics) == v:t_dict | ||
| break | ||
| endif | ||
|
|
||
| execute 'sleep!' 1 | ||
| endfor | ||
|
|
||
| call s:assert.equal(type(l:actual_diagnostics), v:t_dict) |
Comment on lines
+56
to
+66
| let l:actual_diagnostics = {} | ||
| for l:attempt in range(1, 30) | ||
| let l:actual_diagnostics = getbufvar(l:bufinfo.bufnr, 'LanguageClient_statusLineDiagnosticsCounts') | ||
| if type(l:actual_diagnostics) == v:t_dict | ||
| break | ||
| endif | ||
|
|
||
| execute 'sleep!' 1 | ||
| endfor | ||
|
|
||
| call s:assert.equal(type(l:actual_diagnostics), v:t_dict) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )