feat: port pspath workspace support#3
Open
dkattan wants to merge 8 commits into
Open
Conversation
Port the provider-backed workspace and pspath URI support from feature/get-content onto the private host-package branch so the Immense wrapper package can be published for ImmyBot consumption. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the provider-backed workspace port compatible with the older feature/submodule-to-nuget branch by using ScriptFile.IsInMemory and restoring the workspace path helpers AnalysisService still expects. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When Get-ChildItem enumerates items from the ScriptPSProvider drive, PowerShell sets PSPath to the drive-qualified form (pspath:\local\Function\script.ps1) rather than the provider-qualified form (ScriptPSProvider::local\Function\script.ps1). CreatePowerShellPathUri now detects drive-qualified pspath: paths and converts them to pspath://ScriptPSProvider/local/Function/script.ps1 URIs so they round-trip correctly through GetPowerShellPath and TryGetFile. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Three fixes for EnumeratePSFiles to work with non-FileSystem providers: 1. CreatePowerShellPathUri: handle provider-qualified pspath: drive paths (ScriptPSProvider::pspath:\local\Function\script.ps1) by stripping the provider prefix and reconstructing the URI from the drive-qualified path. 2. Skip Include/Exclude/Depth/FollowSymlink parameters for non-FileSystem provider paths. These are FileSystem-specific dynamic parameters that cause Get-ChildItem to fail with ProviderInvocationException on custom providers like ScriptPSProvider. 3. Add s_psPathProviderHost constant for the ScriptPSProvider host component used in pspath:// URIs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix DebugMode check in BreakpointHandlers to use flag-based comparison - Re-call SetDebugMode after breakpoint registration to trigger SetInternalDebugMode - Normalize file:///scripts/... URIs to pspath:// for breakpoint matching - Use temp file approach for script execution to ensure functionContext._file is set - Add TLS _debuggingMode fix for pipeline thread context Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the global scope filter in ShouldAddToAutoVariables with a built-in variable name allowlist. Previously, any variable that existed in the global scope was filtered from Auto — but dot-sourced scripts put user variables in the global scope, so they never appeared. Also allow all LocalVariable types through (not just the curated whitelist) and clean up diagnostic logging. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Read VariableLayerAttribute from PSVariable.Attributes during breakpoint stops to create custom DAP scope containers like 'Script', 'RunContext', 'Action', 'Session'. VariableDetails.PSVariable property stores the original PSVariable reference for attribute inspection. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
744038a to
bec33ff
Compare
Remove all /tmp/pses-debug.log diagnostic logging from LaunchScriptAsync. Keep only the essential TLS _debuggingMode fix and CurrentRunspace null fix. Replace File.AppendAllText error logging with _logger.LogError calls. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
pspath://workspace and document handling fromdkattan/feature/get-contentfeature/submodule-to-nugetpackaging branchMicrosoft.PowerShell.EditorServices.Host 3.18.1-preview.3from this branchValidation