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

[display] use a separate diagnostics kind for deprecation warnings #8632

Merged
merged 2 commits into from
Aug 13, 2019

Conversation

Gama11
Copy link
Member

@Gama11 Gama11 commented Aug 13, 2019

This lets us add support for DiagnosticTag.Deprecated in vshaxe (without this, we can't really tell deprecation warnings apart from other warnings).

@Simn
Copy link
Member

Simn commented Aug 13, 2019

We should check if everything related to deprecation warnings goes through this, but the change is good regardless.

@Gama11
Copy link
Member Author

Gama11 commented Aug 13, 2019

Hm.. I was about to say "where else would it go", but I guess there's at least one "custom" deprecation warning.. :/

haxe/src/typing/typeload.ml

Lines 253 to 257 in 710eea6

let msg = match Meta.get Meta.Deprecated td.t_meta with
| _,[EConst(String s),_],_ -> s
| _ -> "This typedef is deprecated in favor of " ^ (s_type (print_context()) td.t_type)
in
ctx.com.warning msg p

@Simn
Copy link
Member

Simn commented Aug 13, 2019

IIRC we had to check that early because the typedef would disappear in some cases.

@Gama11 Gama11 merged commit 3bdebef into HaxeFoundation:development Aug 13, 2019
@Gama11 Gama11 deleted the DKDeprecationWarning branch August 13, 2019 15:08
Gama11 added a commit to vshaxe/haxe-language-server that referenced this pull request Aug 13, 2019
Gama11 added a commit to vshaxe/vshaxe that referenced this pull request Aug 13, 2019
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

Successfully merging this pull request may close these issues.

2 participants