Skip to content
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

Build failing preventing updates to the latest omnisharp-roslyn binary #495

Open
xen22 opened this issue Apr 4, 2019 · 3 comments
Open

Comments

@xen22
Copy link

xen22 commented Apr 4, 2019

Automatic pull request to update the omnisharp-roslyn version have not gone through for over a year now due to the build failing.

@xen22
Copy link
Author

xen22 commented Apr 4, 2019

image

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'.

@xen22 xen22 changed the title Build failing preventing updating to the latest omnisharp-roslyn binary Build failing preventing updates to the latest omnisharp-roslyn binary Apr 4, 2019
@xen22
Copy link
Author

xen22 commented Apr 11, 2019

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?

@mattn
Copy link

mattn commented Dec 17, 2019

Any update on this? omnisharp-node-client does not work on latest roslyn server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants