-
Notifications
You must be signed in to change notification settings - Fork 241
Support ConstrainedLanguage mode #1269
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
Support ConstrainedLanguage mode #1269
Conversation
src/PowerShellEditorServices/Services/PowerShellContext/PowerShellContextService.cs
Outdated
Show resolved
Hide resolved
e7fdca2 to
16fa1d0
Compare
16fa1d0 to
3bf1bac
Compare
useLocalScope: true or .AddCommand in a few places|
This is now a "Support ConstrainedLanguage mode" PR... Ultimately:
there's a piece of me that would like to get this out the door to have customers try in (in Preview) and see where we can improve. |
|
It looks like this is by design: |
SeeminglyScience
left a comment
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.
Awesome! 🙂 what a wild ride that was eh?
src/PowerShellEditorServices/Services/PowerShellContext/PowerShellContextService.cs
Outdated
Show resolved
Hide resolved
src/PowerShellEditorServices.Hosting/Commands/StartEditorServicesCommand.cs
Show resolved
Hide resolved
src/PowerShellEditorServices/Services/PowerShellContext/PowerShellContextService.cs
Show resolved
Hide resolved
src/PowerShellEditorServices.Hosting/Commands/StartEditorServicesCommand.cs
Show resolved
Hide resolved
src/PowerShellEditorServices/Services/PowerShellContext/Session/PowerShellVersionDetails.cs
Show resolved
Hide resolved
|
Complexity increasing per file
==============================
- src/PowerShellEditorServices/Services/PowerShellContext/PowerShellContextService.cs 2
See the complete overview on Codacy |
SeeminglyScience
left a comment
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.
LGTM!
With this PR, we have some support of
ConstrainedLanguagemode. TheLanguageModeis inherited from the initial runspace that startsStart-EditorServicesWindows PowerShell is started without PSRL and it is working... but there's more work that will need to be done here. Here are notes I've made from this:
Clear-Hostdoesn't work... probably because$psEditordoesn't work$psEditor.....Clear()on FullLanguage$psEditordoesn't work because of method invokingGet-Module -listin Windows PowerShellSystem.NotSupportedException: Cannot dot-source this command because it was defined in a different language mode...over and over and over so not sure if it's PSRL's fault or PSES's yet...