Skip to content

Deprecation messages don't show in intellisense popup #45

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

Closed
tom-sherman opened this issue Dec 8, 2020 · 8 comments
Closed

Deprecation messages don't show in intellisense popup #45

tom-sherman opened this issue Dec 8, 2020 · 8 comments

Comments

@tom-sherman
Copy link

image

This function is tagged with

[@@deprecated "This function will soon be deprecated. Please, use `List.keepWithIndex` instead."]

However this message doesn't show in the popup.

@chenglou
Copy link
Member

cc @cristianoc @ryyppy might need some collabs for this

cristianoc added a commit to rescript-lang/rescript-editor-support that referenced this issue Mar 19, 2021
Add support for `@deprecated` attributes in autocomplete and hover.
For autocomplete: tell the client that the item is deprecated (typically shown with a strike-through by the client). Also, show the deprecation message.
For hover, show the deprecation message.

See rescript-lang/rescript-vscode#45
@cristianoc
Copy link
Collaborator

cristianoc commented Mar 19, 2021

Support for autocomplete and hover here: rescript-lang/rescript-editor-support#76

For the missing message in the problems part, perhaps the warning message should be printed differently. Edit: indeed it has an indentation issue.

@cristianoc
Copy link
Collaborator

CC @chenglou

@chenglou
Copy link
Member

Oh man I totally forgot it was the indent thing... sorry I'll look into it

@chenglou
Copy link
Member

K I'm fixing the warning indentation, but then we'd end up with duplicated deprecation message if we merge rescript-lang/rescript-editor-support#76? Yours on hover, mine in diagnostics which also appears on hover

@cristianoc
Copy link
Collaborator

It could be removed from hover, though the hover already shows its own block with types and doc comments, and can as well show the deprecation message as part of that block for completeness. Either way.

cristianoc added a commit to rescript-lang/rescript-editor-support that referenced this issue Mar 24, 2021
Add support for `@deprecated` attributes in autocomplete and hover.
For autocomplete: tell the client that the item is deprecated (typically shown with a strike-through by the client). Also, show the deprecation message.
For hover, show the deprecation message.

See rescript-lang/rescript-vscode#45
@chenglou
Copy link
Member

chenglou commented Mar 29, 2021

For posteriority, this is what it looks like with duplicated warnings:

image

Screen Shot 2021-03-29 at 7 58 02 AM

The rationale to remove it from the editor binary side, instead of on the diagnostics parsing side, is that the latter respects whichever bsconfig setting regarding suppressing deprecation warnings. Although the former looks better in the screenshot...

@chenglou
Copy link
Member

Fixed

chenglou pushed a commit to chenglou/rescript-editor-support that referenced this issue Apr 24, 2021
Add support for `@deprecated` attributes in autocomplete and hover.
For autocomplete: tell the client that the item is deprecated (typically shown with a strike-through by the client). Also, show the deprecation message.
For hover, show the deprecation message.

See rescript-lang/rescript-vscode#45
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

3 participants