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

add a small message to @deprecated #2202

Open
teto opened this issue Jul 15, 2023 · 3 comments
Open

add a small message to @deprecated #2202

teto opened this issue Jul 15, 2023 · 3 comments

Comments

@teto
Copy link

teto commented Jul 15, 2023

maybe this was discussed before but right now I've got a whole lot of functions which I see as @deprecated but I have to look into the source code to see what to replace it with. Would be nice if one could add a message explaining how to fix the deprecation notice ?

@C3pa
Copy link
Contributor

C3pa commented Jul 16, 2023

I usually just write at the top of the function description what this function should be replaced with.

For example:

--- **Use `bar()` instead.**
--- Foo description.
--- @deprecated
--- @param a string
function foo(a)
end

@carsakiller
Copy link
Collaborator

I think that what C3pa said in combination with #2175 would be satisfactory. Something like the below:

---Replaced by [bar()](lua://someSymbol)
---Original description
---@deprecated
function foo() end

@mycroftjr
Copy link

Why on earth does @deprecated not just accept an optional message explaining why/what to use instead?

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

4 participants