-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove amplitude experiment dependency for Code scans [HEAD-316] (…
- Loading branch information
Asaf Agami
authored
May 18, 2023
1 parent
73df773
commit fd720fb
Showing
18 changed files
with
53 additions
and
475 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 0 additions & 68 deletions
68
src/snyk/common/languageServer/experiments/codeScanOrchestrator.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ import { | |
} from '../constants/languageServer'; | ||
import { CONFIGURATION_IDENTIFIER } from '../constants/settings'; | ||
import { ErrorHandler } from '../error/errorHandler'; | ||
import { ExperimentService } from '../experiment/services/experimentService'; | ||
import { ILog } from '../logger/interfaces'; | ||
import { getProxyEnvVariable, getProxyOptions } from '../proxy'; | ||
import { DownloadService } from '../services/downloadService'; | ||
|
@@ -49,7 +48,6 @@ export class LanguageServer implements ILanguageServer { | |
private authenticationService: IAuthenticationService, | ||
private readonly logger: ILog, | ||
private downloadService: DownloadService, | ||
private experimentService: ExperimentService, | ||
) { | ||
this.downloadService = downloadService; | ||
} | ||
|
@@ -97,7 +95,7 @@ export class LanguageServer implements ILanguageServer { | |
synchronize: { | ||
configurationSection: CONFIGURATION_IDENTIFIER, | ||
}, | ||
middleware: new LanguageClientMiddleware(this.configuration, this.experimentService), | ||
middleware: new LanguageClientMiddleware(this.configuration), | ||
/** | ||
* We reuse the output channel here as it's not properly disposed of by the language client ([email protected]) | ||
* See: https://github.com/microsoft/vscode-languageserver-node/blob/cdf4d6fdaefe329ce417621cf0f8b14e0b9bb39d/client/src/common/client.ts#L2789 | ||
|
@@ -107,16 +105,17 @@ export class LanguageServer implements ILanguageServer { | |
|
||
// Create the language client and start the client. | ||
this.client = this.languageClientAdapter.create('Snyk LS', SNYK_LANGUAGE_SERVER_NAME, serverOptions, clientOptions); | ||
this.client | ||
.onReady() | ||
.then(() => { | ||
this.registerListeners(this.client); | ||
}) | ||
.catch((error: Error) => ErrorHandler.handle(error, this.logger, error.message)); | ||
|
||
// Start the client. This will also launch the server | ||
this.client.start(); | ||
this.logger.info('Snyk Language Server started'); | ||
|
||
try { | ||
await this.client.onReady(); | ||
this.registerListeners(this.client); | ||
} catch (error) { | ||
return ErrorHandler.handle(error, this.logger, error instanceof Error ? error.message : 'An error occurred'); | ||
} | ||
} | ||
|
||
private registerListeners(client: LanguageClient): void { | ||
|
@@ -165,7 +164,7 @@ export class LanguageServer implements ILanguageServer { | |
// Initialization options are not semantically equal to server settings, thus separated here | ||
// https://github.com/microsoft/language-server-protocol/issues/567 | ||
async getInitializationOptions(): Promise<InitializationOptions> { | ||
const settings = await LanguageServerSettings.fromConfiguration(this.configuration, this.experimentService); | ||
const settings = await LanguageServerSettings.fromConfiguration(this.configuration); | ||
|
||
return { | ||
...settings, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.