You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Properly disable (if/def out) all code related to session connection/disconnection for Unix builds #7008
This issue is opened based on the comment in PR #6939.
Class QueryRunspaces and enum SessionFilterState from ConnectPSSession.cs
QueryRunspaces is only used for session disconnect, which is only supported on Windows. PSRemotingCmdlets.cs is a heavily loaded file to support many remoting cmdlet base classes. Moving QueryRunspaces there just makes it more bloated and confusing in my opinion.
I feel that QueryRunspaces should be put into a separate utils file that can be skipped for Linux.
You should also #ifdef out its use in the Get-PSSession parameter set since it is not supported on Linux.
The type QueryRunspaces is only for session connection/disconnection. It's used in Connect-PSSession/Receive-PSSession/Get-PSSession and it's also directly used by the abstract class PSRunspaceCmdlet from PSRemotingCmdlet.cs. Now Connect-PSSession and Receive-PSSession are disabled in Unix build, but QueryRunspaces is still used in Get-PSSession (in getrunspacecommand.cs) and PSRunspaceCmdlet (in PSRemotingCmdlet.cs), even though the connenction/disconnection feature is not available on Unix platforms.
So, we need to properly disable all code realted to session connection/disconnection for Unix build, and then, as Paul Higinbotham (@PaulHigin) suggested in the comment, QueryRunspaces and SessionFilterState probably should be moved a separate file that can be skipped for Unix build compilation.
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commented on Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commented on Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
Activity
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 23, 2023
This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.