-
Notifications
You must be signed in to change notification settings - Fork 223
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
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:
|
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
Here is an overview of what got changed by this pull request: Complexity increasing per file
==============================
- src/PowerShellEditorServices/Services/PowerShellContext/PowerShellContextService.cs 2
See the complete overview on Codacy |
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
ConstrainedLanguage
mode. TheLanguageMode
is inherited from the initial runspace that startsStart-EditorServices
Windows 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-Host
doesn't work... probably because$psEditor
doesn't work$psEditor.....Clear()
on FullLanguage$psEditor
doesn't work because of method invokingGet-Module -list
in 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...