Skip to content

Commit 25112e6

Browse files
Document the cross-repo dev and test cycle for Copilot
Record that `modules/` is a symlink to the sibling PowerShellEditorServices `module` directory, so building PSES deploys its DLLs straight into the path the extension and its tests load from — meaning C# changes require rebuilding PSES by hand, and `npm test` exercises the real Extension Host against the locally built server. This trips up anyone (including Copilot) who edits PSES and wonders why the extension didn't pick it up. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 2e94454 commit 25112e6

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

.github/copilot-instructions.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,25 @@ extensions.
4040

4141
### PSES and Cross-Repo Work
4242

43-
The `modules/` folder contains the PSES, PSReadLine, and PSScriptAnalyzer PowerShell modules. In development it is a
44-
symlink to `../PowerShellEditorServices/module`[PowerShellEditorServices][] must be
43+
The `modules/` folder contains the PSES, PSReadLine, and PSScriptAnalyzer PowerShell modules. In development the whole
44+
folder is a symlink to `../PowerShellEditorServices/module`[PowerShellEditorServices][] must be
4545
cloned as a sibling and built before `npm run compile` will succeed. For cross-repo work, use `pwsh-extension-dev.code-workspace`.
4646

47+
**Cross-repo dev/test cycle.** Because `modules/` is a symlink into the sibling PSES checkout's
48+
`module/` directory, building PSES deploys its DLLs straight into the path the extension loads from —
49+
there is no copy step:
50+
51+
- **Edit PSES C# (server)** → rebuild PSES (e.g. `dotnet build src/PowerShellEditorServices/PowerShellEditorServices.csproj`,
52+
or `Invoke-Build Build` for a full build). The build deploys into `module/PowerShellEditorServices/bin`,
53+
which the symlinked `modules/` exposes to the extension automatically. The extension (and its tests)
54+
then load the new DLL — no copy, but you must rebuild PSES, since the extension does not.
55+
- **Edit extension TypeScript (client)**`npm run compile`.
56+
- **Verify end-to-end**`npm test`. This launches a real VS Code Extension Host with PSES connected
57+
and runs the Mocha suite, exercising the locally-built PSES through the symlink. Prefer this over
58+
only eyeballing the Extension Development Host: it is the way to confirm cross-repo (client + server)
59+
changes actually work, and to catch regressions. After changing a setting's default or any shared
60+
behavior, run the full suite — e.g. ISE-compatibility tests assert against setting defaults.
61+
4762
## Key Conventions
4863

4964
- **VS Code best practices**: Follow the [Extension Guidelines](https://code.visualstudio.com/api/references/extension-guidelines) and [UX Guidelines](https://code.visualstudio.com/api/ux-guidelines/overview). Use VS Code's APIs idiomatically and prefer disposable patterns for lifecycle management.

0 commit comments

Comments
 (0)