-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Code] refactor launcher code, add unit tests #36863
Conversation
💔 Build Failed |
💔 Build Failed |
0ba7abc
to
d7c5aee
Compare
💚 Build Succeeded |
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.
some minor comments inline.
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
/* eslint-disable */ | ||
// This file is used in the test, using subprocess.fork to load a module directly, so this module can not be typescript |
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.
👍
server.close(); | ||
this.eventEmitter.emit('connect'); | ||
socket.on('close', () => this.onSocketClosed()); | ||
if (!this.connectingPromise) { |
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.
nit: so this tries to dedup the connection promises, right? can we leave some comment on here on what issue it solves.
} | ||
const log: Logger = this.loggerFactory.getLogger(['code', `ts@${this.targetHost}:${port}`]); | ||
const proxy = new LanguageServerProxy(port, this.targetHost, log, this.options.lsp); | ||
return 2089; |
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.
nit: maybe a const at the beginning of this class instead of a hard-wired value.
d7c5aee
to
6dcda9d
Compare
💚 Build Succeeded |
Summary
Refactor launcher code, add unit tests
https://github.com/elastic/code/issues/1182
https://github.com/elastic/code/issues/1167
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers