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

[vscode] support new CompletionItem.range shape #7820

Merged
merged 1 commit into from
May 15, 2020

Conversation

akosyakov
Copy link
Member

@akosyakov akosyakov commented May 14, 2020

What it does

Also don't send:

  • duplicate ranges on provide completions
  • entire completion back and forth on resolve completion

How to test

  • check that completions are provider, detailed information is resolved on info, and properly applied for typescript
  • there is no error logging as in the issue

Review checklist

Reminder for reviewers

@akosyakov akosyakov added typescript issues related to the typescript language vscode issues related to VSCode compatibility labels May 14, 2020
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for providing a quick fix to the issue 👍
There seems to be CI errors regarding completionItems in the metrics extension:

Also don't send:
- duplicate ranges on provide completions
- entire completion back and forth on resolve completion

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
@akosyakov akosyakov force-pushed the akosyakov/no-typescript-suggestions-7810 branch from 8afa0b6 to bf4e09b Compare May 14, 2020 15:24
@akosyakov
Copy link
Member Author

@vince-fugnitto should be fixed now

@lmcbout
Copy link
Contributor

lmcbout commented May 14, 2020

@akosyakov The PR does not compile. See the errors reported:
1- packages/plugin-metrics/src/browser/plugin-metrics-languages-main.ts:48:15 - error TS2416: Property 'resolveCompletionItem' in type
2- packages/plugin-metrics/src/browser/plugin-metrics-languages-main.ts:52:66 - error TS2554: Expected 3 arguments, but got 5.
52 super.resolveCompletionItem(handle, model, position, item, token));

3- packages/plugin-metrics/src/browser/plugin-metrics-frontend-module.ts:31:34 - error TS2345: Argument of type 'typeof LanguagesMainPluginMetrics' is not assignable to parameter of type 'new (...args: any[]) => LanguagesMainImpl'.
Construct signature return types 'LanguagesMainPluginMetrics' and 'LanguagesMainImpl' are incompatible.

@akosyakov
Copy link
Member Author

@lmcbout please fetch new changes

Copy link
Contributor

@lmcbout lmcbout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on UBUNTU 18.04
Looks good, no more loops reported on the console about the "Invalid Completion Item"

Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirmed that completion items are now properly populated (ex: when editing a typescript file).

@akosyakov akosyakov merged commit 96e3c72 into master May 15, 2020
@akosyakov akosyakov deleted the akosyakov/no-typescript-suggestions-7810 branch May 15, 2020 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typescript issues related to the typescript language vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No Typescript suggestions for Typescript files when using builtin version 1.44.2
3 participants