Skip to content

Commit a45c02b

Browse files
lucaspimentelclaude
andcommitted
fix: ensure release includes all dependencies
- Change release workflow to use dotnet publish for Module (was using dotnet build which omits runtimes/ directory with native SQLite libs) - Update install-remote.ps1 to recursively copy all directories from release archive (handles runtimes/, Functions/, future subdirs) - Document pitfall in CLAUDE.md to prevent regression 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent bfbee41 commit a45c02b

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
run: dotnet publish src/PSCue.ArgumentCompleter/PSCue.ArgumentCompleter.csproj -c Release -r ${{ matrix.rid }} --self-contained -o dist/${{ matrix.rid }}/
4242

4343
- name: Build Module
44-
run: dotnet build src/PSCue.Module/PSCue.Module.csproj -c Release -o dist/${{ matrix.rid }}/
44+
run: dotnet publish src/PSCue.Module/PSCue.Module.csproj -c Release -o dist/${{ matrix.rid }}/
4545

4646
- name: Copy module files
4747
shell: pwsh

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ public void TestLearningAccess()
254254
11. **PCD attempts Set-Location on non-existent path**: Always loop through ALL suggestions and verify existence before navigation. Never call `Set-Location` on paths that don't exist - show helpful error messages instead. This handles race conditions and stale database entries gracefully.
255255
12. **PCD tab completion behavior**: CompletionText must match native cd exactly - use .\ prefix for child directories, ..\ for siblings, and single quotes for spaces. ListItemText should be clean (no prefixes/separators/quotes). See module/Functions/PCD.ps1:183-228 for implementation.
256256
13. **Testing with non-existent paths**: Use `skipExistenceCheck: true` parameter in `PcdCompletionEngine.GetSuggestions()` when testing with mock/non-existent paths. Production code filters non-existent paths by default.
257+
14. **Release builds missing dependencies**: The release workflow (.github/workflows/release.yml) MUST use `dotnet publish` (not `dotnet build`) for PSCue.Module to include all dependencies, especially the `runtimes/` directory with native SQLite libraries. `dotnet build` only outputs primary assemblies, while `dotnet publish` creates a complete deployable package. The remote install script (install-remote.ps1) recursively copies all directories from the release archive to handle `runtimes/`, `Functions/`, and any future subdirectories.
257258

258259
## Documentation
259260
- **Implementation status**:

install-remote.ps1

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,12 @@ try {
207207
}
208208
}
209209

210-
# Copy Functions directory if it exists
211-
$FunctionsDir = Join-Path $ExtractDir "Functions"
212-
if (Test-Path $FunctionsDir) {
213-
Copy-Item -Path $FunctionsDir -Destination $InstallDir -Recurse -Force
214-
Write-Info " Installed: Functions/"
210+
# Copy all directories from extracted archive (Functions, runtimes, etc.)
211+
$DirectoriesToCopy = Get-ChildItem -Path $ExtractDir -Directory
212+
213+
foreach ($dir in $DirectoriesToCopy) {
214+
Copy-Item -Path $dir.FullName -Destination $InstallDir -Recurse -Force
215+
Write-Info " Installed: $($dir.Name)/"
215216
}
216217

217218
# Success!

0 commit comments

Comments
 (0)