Conversation
Uh oh!
There was an error while loading. Please reload this page.
5dcc6d7
to e9cb397
Compare Uh oh!
There was an error while loading. Please reload this page.
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
Uh oh!
There was an error while loading. Please reload this page.
e9cb397
to 5678505
Compare Still happening to me in a async pickPSHostProcess() {
await this.getLanguageClient();
const items = [];
const response = await this.languageClient?.sendRequest(GetPSHostProcessesRequestType, {});
for (const process3 of response ?? []) {
let windowTitle = "";
if (process3.mainWindowTitle) {
windowTitle = `, ${process3.mainWindowTitle}`;
}
items.push({
label: process3.processName,
description: `PID: ${process3.processId.toString()}${windowTitle}`,
processId: process3.processId
});
} Let me try it in extension debug |
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.
From Code Review
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
423a92b
to eb87b2e
Compare Now also resolves the root of #4699. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
eb87b2e
to e1b63cc
Compare Ok so we removed the notion of IDs (which are integers) being strings because that broke serialization with recent updates. But on inspection we realized the whole point was to be able to say "current" and have the attach configuration attach to the currently running Extension Terminal. Except that this was an unsupported, half-baked scenario (sure, it attached, but it couldn't actually be debugged properly). So now that throws warnings in both the client and server. The defaults for `processId` and `runspaceId` where changed to `null` (again, now they're just integers) which means to query for them. The supplied but half-baked configuration was removed.
This makes a lot more sense and fixes a long-standing bug. Also cleaned up a lot while at it. 1. `SessionManager` is created and the features are injected into the session manager with the intention of them being able to "register" their language client event handlers in the period between when the client is created and when it is started. 2. For each feature, if it gets to a point where it needs the language client, we want them to wait on a promise for the "started" client to be provided from the session manager before continuing. 3. Once it is started, the session manager passes the client to `LanguageClientConsumer` which resolves the promise for the features so they can continue.
e1b63cc
to d429beb
Compare
Wow this was a mess. Needs PowerShell/PowerShellEditorServices#2130, and I'm a little worried about breaking changes but supplying
"current"
toprocessId
is special-cased to still work (well, throw an appropriate warning), since the launch configuration types only generate warnings.Ok so we removed the notion of IDs (which are integers) being strings because that broke serialization with recent updates. But on inspection we realized the whole point was to be able to say "current" and have the attach configuration attach to the currently running Extension Terminal. Except that this was an unsupported, half-baked scenario (sure, it attached, but it couldn't actually be debugged properly). So now that throws warnings in both the client and server. The defaults for
processId
andrunspaceId
where changed tonull
(again, now they're just integers) which means to query for them. The supplied but half-baked configuration was removed.Fixes #4843