-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
fix(diagnostic): show backtrace for deprecation warnings #28824
Conversation
Note: The argument EDIT: seems it was intentional? https://github.com/neovim/neovim/pull/26618/files#r1429248469 |
That particular instance was intentional, because the backtrace there doesn't provide any useful information. It's not a call site of a specific function, it's warning about the use of |
I see, thanks for the explanation. This might be too niche, but in my specific configs it was a plugin (
So I think backtrace information could be still useful for this particular case as well as for user configs? |
For |
Problem: On nvim 11.0-dev, deprecation warnings due to an use of hard-deprecated APIs such as: - `vim.diagnostic.disable()` - `vim.diagnostic.is_disabled()` etc. are not accompanied by backtrace information. It makes difficult for users to figure out which lines or which plugins are still using deprecated APIs. Solution: use `backtrace = true` in vim.deprecate() call.
This makes sense -- backtrace should be omitted for this. I've updated the PR accordingly. |
Problem: On nvim 11.0-dev, deprecation warnings due to an use of hard-deprecated APIs such as:
vim.diagnostic.disable()
vim.diagnostic.is_disabled()
etc. are not accompanied by backtrace information.
It makes difficult for users to figure out which lines or which plugins are still using deprecated APIs.
Solution: use
backtrace = true
in vim.deprecate() call.