omnisharp-node-client
omnisharp-node-client copied to clipboard
Build failing preventing updates to the latest omnisharp-roslyn binary
Automatic pull request to update the omnisharp-roslyn version have not gone through for over a year now due to the build failing.
Build errors: https://travis-ci.org/OmniSharp/omnisharp-node-client/jobs/514867669
languageserver/server.ts(582,22): error TS2345: Argument of type 'RequestType<GetCodeActionsParams, CodeActionList, void, void>' is not assignable to parameter of type 'string'.
languageserver/server.ts(582,53): error TS7031: Binding element 'textDocument' implicitly has an 'any' type.
languageserver/server.ts(582,67): error TS7031: Binding element 'range' implicitly has an 'any' type.
languageserver/server.ts(582,74): error TS7031: Binding element 'context' implicitly has an 'any' type.
languageserver/server.ts(600,22): error TS2345: Argument of type 'RequestType<RunCodeActionParams, WorkspaceEdit, void, void>' is not assignable to parameter of type 'string'.
languageserver/server.ts(600,52): error TS7031: Binding element 'textDocument' implicitly has an 'any' type.
languageserver/server.ts(600,66): error TS7031: Binding element 'range' implicitly has an 'any' type.
languageserver/server.ts(600,73): error TS7031: Binding element 'context' implicitly has an 'any' type.
languageserver/server.ts(600,82): error TS7031: Binding element 'identifier' implicitly has an 'any' type.
languageserver/server.ts(612,22): error TS2345: Argument of type 'RequestType<TextDocumentPositionParams, Implementation, void, void>' is not assignable to parameter of type 'string'.
languageserver/server.ts(612,53): error TS7031: Binding element 'textDocument' implicitly has an 'any' type.
languageserver/server.ts(612,67): error TS7031: Binding element 'position' implicitly has an 'any' type.
languageserver/server.ts(623,22): error TS2345: Argument of type 'RequestType<NavigateParams, Position, void, void>' is not assignable to parameter of type 'string'.
languageserver/server.ts(623,44): error TS7006: Parameter 'params' implicitly has an 'any' type.
lib/async/AsyncClient.ts(41,40): error TS7017: Element implicitly has an 'any' type because type 'string | number | symbol' has no index signature.
lib/reactive/ReactiveClient.ts(64,40): error TS7017: Element implicitly has an 'any' type because type 'string | number | symbol' has no index signature.
lib/reactive/ReactiveCombinationClient.ts(57,40): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'ArrayLike<string> | null | undefined'.
Type 'number' is not assignable to type 'ArrayLike<string> | null | undefined'.
One such error seems to be related to the custom version of lodash used in this project.
The error is on this line: https://github.com/OmniSharp/omnisharp-node-client/blob/master/lib/reactive/ReactiveCombinationClient.ts#L57
protected makeObservable = <T>(selector: (client: TClient) => Observable<T>) => {
// Caches the value, so that when the underlying clients change
// we can start with the old value of the remaining clients
const cache: { [key: string]: T } = {};
/* tslint:disable:no-string-literal */
return this._clientsSubject.switchMap(clients => {
// clean up after ourselves.
>>> const removal = difference(keys(cache), clients.map(z => z.uniqueId));
And error is:
error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'ArrayLike<string> | null | undefined'.
Type 'number' is not assignable to type 'ArrayLike<string> | null | undefined'.
57 const removal = difference(keys(cache), clients.map(z => z.uniqueId));
Which implies that keys(cache)
returns a number or string instead of an array.
When I look at the generated typings for lodash, which are in "typings/modules/lodash/index.d.ts", surely enough, the definition of keys does not return an array:
export interface Keys {
<T>(obj: T): keyof T;
}
Could it be my version of typescript vs what this project was using when the build was working? Something doesn't look right but I can't tell what - I'm new to Typescript and the typings mechanism..
Has anyone got any ideas?
Any update on this? omnisharp-node-client does not work on latest roslyn server.