Title: Properly disable (if/def out) all code related to session connection/disconnection for Unix builds · Issue #7008 · PowerShell/PowerShell · GitHub
Open Graph Title: Properly disable (if/def out) all code related to session connection/disconnection for Unix builds · Issue #7008 · PowerShell/PowerShell
X Title: Properly disable (if/def out) all code related to session connection/disconnection for Unix builds · Issue #7008 · PowerShell/PowerShell
Description: 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...
Open Graph Description: 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 su...
X Description: 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 su...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/7008
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Properly disable (if/def out) all code related to session connection/disconnection for Unix builds","articleBody":"This issue is opened based on the [comment](https://github.com/PowerShell/PowerShell/pull/6939#issuecomment-394880053) in PR #6939.\r\n\r\n\u003e Class QueryRunspaces and enum SessionFilterState from ConnectPSSession.cs\r\n\u003e\r\n\u003e 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.\r\nI feel that QueryRunspaces should be put into a separate utils file that can be skipped for Linux.\r\nYou should also #ifdef out its use in the Get-PSSession parameter set since it is not supported on Linux.\r\n\r\nThe 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.\r\n\r\nSo, we need to properly disable all code realted to session connection/disconnection for Unix build, and then, as @PaulHigin suggested in the comment, `QueryRunspaces` and `SessionFilterState` probably should be moved a separate file that can be skipped for Unix build compilation.\r\n","author":{"url":"https://github.com/daxian-dbw","@type":"Person","name":"daxian-dbw"},"datePublished":"2018-06-05T23:53:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/7008/PowerShell/issues/7008"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:930d6192-3fb8-f628-e331-76e0ee103168 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D05A:1C4230:1187:1686:6A52B351 |
| html-safe-nonce | 6cbd8b6f336ef0ce3b551410a070eb4831e82fd87e0fcfae6be32865f051183b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDVBOjFDNDIzMDoxMTg3OjE2ODY6NkE1MkIzNTEiLCJ2aXNpdG9yX2lkIjoiNjExODcxODE5ODE2NDY2NTE2OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8e0ffbb0c447504bba8632a910fcf3c556f0c02766019c21d09c9a3010fdcc29 |
| hovercard-subject-tag | issue:329664195 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/7008/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d1d6fa3766c0f7b6679cd502435462fdebdc0ce3e3a4aca3fa50a0a57c13ef0d/PowerShell/PowerShell/issues/7008 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d1d6fa3766c0f7b6679cd502435462fdebdc0ce3e3a4aca3fa50a0a57c13ef0d/PowerShell/PowerShell/issues/7008 |
| og:image:alt | 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 su... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | daxian-dbw |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width