-
Notifications
You must be signed in to change notification settings - Fork 234
Reimplement the way PowerShell is run and hosted in PSES with a dedicated pipeline thread consumer #1459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Reimplement the way PowerShell is run and hosted in PSES with a dedicated pipeline thread consumer #1459
Changes from all commits
Commits
Show all changes
178 commits
Select commit
Hold shift + click to select a range
95558cc
Add progress
rjmholt bef1740
Get to console repl, remove PSContext dependency
rjmholt 908a6df
Completions working
rjmholt b9b9b36
Convert MethodInfo to compiled delegate call
rjmholt 9266126
Continue tweaking REPL
rjmholt b105808
Implement cancellation properly, make F8 work
rjmholt 28e26cc
Set execution policy
rjmholt 8c944fe
Make initialisation executions synchronous
rjmholt ab2b9a0
Remove extraneous runspace set
rjmholt 98e931b
Reuse conhost for prompts
rjmholt 1492dad
Fix newlines
rjmholt e3de6b5
Begin nested prompt implementation
rjmholt b7e99bb
Move to PSContext
rjmholt f94845e
Make nested prompts work
rjmholt 200f1a1
Fix nesting issues with stacks
rjmholt 25358ed
Fix handling of prompt cancellation
rjmholt 827256e
Use concurrent datastructure for stacks
rjmholt 1c5897e
Add simple debug REPL support
rjmholt 1caaa3b
Fix out-string usage in debugger
rjmholt c1c9a2b
Attempt to handle debug exit
rjmholt 1f7ae6b
Make debugger resume commands work
rjmholt f86f04c
Change use of PS context and events to safely manage prompts
rjmholt 0cbf182
Improve debug handling, add remoting support, improve idle processing
rjmholt 2af48b1
Merge PS context into execution service, make REPL service a subcompo…
rjmholt 270cb64
Implement remote debugger waiting
rjmholt d217e1f
Improve cancellation handling and runspace cleanup
rjmholt ddf5bf1
Deal with debug abort in WinPS
rjmholt 3d77cbe
Temp refactor
rjmholt 3b8a8cf
Migrate runspace pieces
rjmholt 404a943
Bring code up to compilation
rjmholt 14c3085
Fix initialization
rjmholt 38ad41b
Finally get the REPL and completions back
rjmholt f71811d
Fix cancellation
rjmholt 9a4e2af
Get debugging to work again
rjmholt ca90b08
Fix rebase issues
rjmholt 5eddb02
Fix incorrect namespace
rjmholt 169c37e
Remove defunct comment
rjmholt 3807555
Add comment about extension service
rjmholt dc49f45
Remove defunct code
rjmholt 390df1b
Use correct wildcard escape method
rjmholt b0b3759
Remove unused value
rjmholt 571afe4
Add comment about debugger implementation
rjmholt e6f369e
Add comment about Debugger.ProcessCommand()
rjmholt c1144e4
Add comments around exception handling
rjmholt 8ae537d
Remove unused exception
rjmholt 65447d9
Add comments to EvaluateHandler
rjmholt bdad3d7
Fix SessionDetails comment
rjmholt 0285339
Add CancellationContext comment
rjmholt 6a36ea2
Use FirstOrDefault()
rjmholt 00d7da3
Add explanation to ErrorRecordExtensions
rjmholt 30a594b
Add comments to PSCommandExtensions
rjmholt 6e3a2e1
Add code ref to ErrorRecordExtensions
rjmholt 8fefda9
Add comment to PowerShellExtensions
rjmholt 80c472e
Simplify $PROFILE code
rjmholt f23cb4b
Document runspace extension method
rjmholt 6388830
Fix profiling loading logic in config handler
rjmholt 1d4c44b
Remove extraneous JS file
rjmholt 2fde356
Debugging dependency injection
rjmholt 4b31412
Get UI debugger running
rjmholt 58edc09
Resolve commented-out code
rjmholt 182d5e5
Improve queue implementation
rjmholt 7f0e4c1
Add async error handling code
rjmholt d29ddc8
Rework execution queue to allow correct cancellation
rjmholt 2673e8c
TEMP: Need to fix cancellation from PSRL scope
rjmholt 0e4eb9e
TEMP: Moving to monolithic host
rjmholt 0c11735
WIP
rjmholt 7dccf66
Move all basic functionality into a new synchronous internal host
rjmholt 26ef0c6
Restore host to simple working order
rjmholt e00394a
Add simple cancellation support
rjmholt a02f409
Ensure startup operations are performed before first prompt
rjmholt 244dbe2
Fix dependency issue
rjmholt 926460a
Fix incorrect remote runspace labelling
rjmholt 0eed465
Begin to make the debugger work
rjmholt c660d38
Fix recursive PSRL cancellation token issue in debugger
rjmholt 08d65b0
Enable proper debug UI interaction
rjmholt 4652a49
Fix remote session connection
rjmholt 7873e1e
Check the current runspace for debug API support
rjmholt 81aab0e
Fix debug disconnect handling
rjmholt 29ec7de
Make remote debugger function correctly
rjmholt f875a35
Remove dead code
rjmholt 3f28ba2
Remove more dead code
rjmholt f5936a3
Add comment about remote debugging
rjmholt ba123c0
Rename event handler
rjmholt 3b2204d
Add ConfigureAwait(false)
rjmholt d0334d0
Make psEditor variable name a constant
rjmholt c3942f9
Remove debug cancellation token
rjmholt 9ced126
Remove duplicated check
rjmholt f7f62ce
Add comment
rjmholt e476975
Add data structure for interlocked latch pattern
rjmholt d6f5cd8
Move cancellation token argument to end of methods
rjmholt 52480b0
Make BlockingConcurrentDeque disposable
rjmholt a3c0ff7
Rename PSES InternalHost to PsesInternalHost
rjmholt 0765466
Change WriteErrorsToHost to ThrowOnError
rjmholt ca92aba
Make default PowerShellExecutionOptions static
rjmholt 1c13b96
Remove PowerShellContextService
rjmholt bde38ef
Ensure ConfigureAwait(false) is used everywhere
rjmholt a8c4ae2
Fix debugger evaluation not being written out
rjmholt 850c9f9
Add comment about nameless variables
rjmholt 8b0f78b
Use nicer pattern matching for condition
rjmholt 002884e
Add TODO about debugger disconnection handling
rjmholt fdb3e37
Convert to `is null` for consistency
rjmholt aac438f
Remove unused dependencies
rjmholt d05e65c
Use AllThreadsContinued consistently
rjmholt 6972c05
Add comment about debug context lifetime
rjmholt b884408
Add context to comment
rjmholt 1457327
Fix breakpoint API test
rjmholt ec8853d
Fix ThrowOnError configuration check
rjmholt 5f58f8c
Ensure the DSC module import fails with an error
rjmholt d5df3a8
Remove unneeded async/await
rjmholt 257cbdc
Add comment explaining remote debug setting
rjmholt e3470c7
Remove unused enum
rjmholt 1dec31d
Add comment to execution options class
rjmholt 7ceccc3
Add comment to synchronous task about synchronous results
rjmholt 433ffd7
Ensure F8 works
rjmholt b6d44e7
Add comment about not exiting the top level
rjmholt 50bf359
Generalize exit handling
rjmholt cd2b08e
Add comment about remote prompt
rjmholt 110af60
Simplify nested PowerShell creation
rjmholt ccf62c3
Use a more explicit return
rjmholt af8b51d
Fix Ctrl-C detection
rjmholt 4fb8ac7
Rename debug event handlers
rjmholt 7b74c7e
Remove unneeded PSRL static ctor call - PSRL is now loaded on the pip…
rjmholt f114166
Move execution service to an interface
rjmholt 257a69b
Enhance remoting comment
rjmholt d800a1d
Turn on psedit registration in remote sessions
rjmholt 71cd709
Ensure failed remote file saves are logged
rjmholt a97afa9
Add comment about IsExternalInit
rjmholt 8d69c46
Reinstate runspace cleanup logic
rjmholt 5c9831f
Fix remote psedit registration
rjmholt b904503
Fix AnalysisService using
rjmholt cf86736
Fix InitialSessionState LanguageMode usage
rjmholt f825d89
Address static analyser compiler errors
rjmholt 78b75b2
Apply suppression to ExitDebugLoop() API
rjmholt 7909acd
Fix NRE in DSC capability discovery
rjmholt 724f615
Remove unused using statements
rjmholt 71d26c6
Add copyright headers
rjmholt ceb20e8
Remove unneeded internal usings
rjmholt ef5595b
Implement PowerShell engine OnIdle events
rjmholt d779a73
Improve artificial idle event comment
rjmholt 9144a77
Fix typo
rjmholt 39f8e4c
Change BlockingConcurrentDequeue to provide IsEmpty property
rjmholt 022c9c7
Fix using
rjmholt 4d5e067
Convert PSRL OnIdle handler to take a CancellationToken
rjmholt c1e317f
Add initial ReadLine implementation
rjmholt 7ab8639
Add common secure string read functionality
rjmholt 4e44a11
Implement shared Ctrl-C test implementation
rjmholt 3f96f56
Avoid unused parser call
rjmholt 9be9cce
Add idle support for legacy readline
rjmholt f9e35f3
Add comment about unimplemented line continuation support
rjmholt 7912dcf
Hook up legacy readline support in the host
rjmholt bfc1b2e
Remove stale TODOs
rjmholt 7149e18
Remove commented out code
rjmholt 7754005
Remove unused usings
rjmholt fee5054
Remove unneeded readline interface methods
rjmholt 36a9a5d
Update comment
rjmholt 16cd6c4
Remove defunct internal cmdlets (#1593)
rjmholt 8c568bc
Initial test build
rjmholt ec3ffdd
Add Host factory
rjmholt 2475a64
Enable host with no repl
rjmholt a00cb49
Comment out LSP unit tests
rjmholt 01a6b63
Bump CI
rjmholt 28c990a
Add timeout to test
rjmholt c8b1f50
Ensure CI is triggered for PRs not for master
rjmholt 7e5ece6
Route startup exceptions through and ensure startup has completed bef…
rjmholt 9bf289c
Fix test compile error
rjmholt 2809eea
Fix process exit throwing
rjmholt c05a296
Fix bad output when console repl is disabled
rjmholt 03981d3
Add debug logging for integration test streams
rjmholt 956571c
Fix overrides
rjmholt 18ad303
Fix variable test with scope change
rjmholt 5376d41
Fix assembly log exception
rjmholt 01c8e52
Only set pipeline thread apartment state on Windows
rjmholt 4db7a0b
Remove debug code
rjmholt 20ac9ad
Reinstate language service unit tests (#1598)
rjmholt 83244eb
Update PSReadLine to 2.2.0-beta4 for idle handler support
rjmholt a578ed4
Update CHANGELOG for `v3.0.0`
rjmholt 1d9e60a
Bump version to `v3.0.0`
andyleejordan 548fdda
Merge pull request #1600 from PowerShell/release
andyleejordan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
"Version": "1.1.3" | ||
}, | ||
"PSReadLine": { | ||
"Version": "2.1.0" | ||
"Version": "2.2.0-beta4", | ||
"AllowPrerelease": true | ||
} | ||
} |
21 changes: 0 additions & 21 deletions
21
src/PowerShellEditorServices.Hosting/Commands/InvokeReadLineConstructorCommand.cs
This file was deleted.
Oops, something went wrong.
53 changes: 0 additions & 53 deletions
53
src/PowerShellEditorServices.Hosting/Commands/InvokeReadLineForEditorServicesCommand.cs
This file was deleted.
Oops, something went wrong.
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
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
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
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
2 changes: 1 addition & 1 deletion
2
src/PowerShellEditorServices/Extensions/Api/ExtensionCommandService.cs
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
1 change: 0 additions & 1 deletion
1
src/PowerShellEditorServices/Extensions/Api/LanguageServerService.cs
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not forget to delete all this code 🤣