- 
                Notifications
    
You must be signed in to change notification settings  - Fork 83
 
feat: launch one remote workspace for all workspace folders #1348
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
Changes from 2 commits
9b620ad
              092ccfe
              9f9903b
              5f4ee34
              ae301e2
              0fa8696
              6e56dee
              1e9e12d
              d12b158
              64dad74
              97c7b30
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -124,15 +124,12 @@ export class WorkspaceFolderManager { | |
| if (this.workspaceState.webSocketClient && this.workspaceState.webSocketClient.isConnected()) { | ||
| const message = this.workspaceState.messageQueue[0] | ||
| if (message) { | ||
| this.workspaceState.webSocketClient | ||
| .send(message) | ||
| .then(() => { | ||
| this.logging.log(` Message sent successfully`) | ||
| this.workspaceState.messageQueue.shift() | ||
| }) | ||
| .catch(error => { | ||
| this.logging.error(`Error sending message: ${error}`) | ||
| }) | ||
| try { | ||
| this.workspaceState.webSocketClient.send(message) | ||
| this.workspaceState.messageQueue.shift() | ||
| } catch (error) { | ||
| this.logging.error(`Error sending message: ${error}`) | ||
| } | ||
| } | ||
| } | ||
| }, this.MESSAGE_PUBLISH_INTERVAL) | ||
| 
         There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given we now have the websocket message frequency being controlled by the workspace folder manager, I believe we should be able to simplify and remove the wrong throttling that we have on the websocket client We should remove this line -> https://github.com/aws/language-servers/blob/main/server/aws-lsp-codewhisperer/src/language-server/workspaceContext/client.ts#L159 and make the  Line 159 linked above is not useful even now since it applies a 100 ms delay to every websocket send call. So if  The scenario explained in the comment https://github.com/aws/language-servers/blob/main/server/aws-lsp-codewhisperer/src/language-server/workspaceContext/client.ts#L144-L156 is too extreme of an example and as explained in the paragraph above, the artificial delay is redundant There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make sense, will remove the wait within   | 
||
| 
          
            
          
           | 
    @@ -640,8 +637,6 @@ export class WorkspaceFolderManager { | |
| }, | ||
| }, | ||
| }) | ||
| 
     | 
||
| // We add this event to the front of the queue here to prevent any race condition that might put events before the didChangeWorkspaceFolders event | ||
| this.workspaceState.messageQueue.push(event) | ||
| this.logging.log(`Added didChangeWorkspaceFolders event to queue`) | ||
| } catch (error) { | ||
| 
          
            
          
           | 
    ||
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.
reminder that debug logs are disabled by default on production
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.
yeah, not seeing these messages valuable to present in user logs.