-
-
Notifications
You must be signed in to change notification settings - Fork 98
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 @deprecated
annotation
#7622
Comments
Already implemented in: Though without adding a reason |
The issue #78941 is about the documentation, not about the engine. Or am I wrong somehow? |
This would be useful not only for scripts, but also for built-in classes. We probably need a system to get the info from However, we can make GDScript get the info from |
Added a little info that this would be useful for modloaders/modders and addon developers. Added two examples for variables too. |
It might look like this: ## @deprecated: Has been moved to [member SomeObject.some_variable], will be kept for compatibility.
var some_variable: String = "Some cool variable"
## @deprecated: May be inaccurate, use [method do_that_thing] instead.
func do_something() -> void: There are no messages because core doesn't support it ( |
Why not add support for it then? Although it would be too much for such a simple feature addition. And if developers are smart enough to search for things, they should be smart enough too look into the documentation and see it's deprecated and why. |
Until this is implemented, I would like to recommend when a user writes |
|
Describe the project you are working on
A framework written in GDScript
Describe the problem or limitation you are having in your project
I want to deprecate a function
Describe the feature / enhancement and how it helps to overcome the problem or limitation
A
@deprecated
annotation that requires a custom message and a bool if the func/var will be removed in a future versionDescribe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Example with custom message, will not be removed in future version
Example with a custom message, will be removed in a future version
If this enhancement will not be used often, can it be worked around with a few lines of script?
A simple function like this could do the job:
Is there a reason why this should be core and not an add-on in the asset library?
I don't think that a addon can add a custom annotation
Why should this proposal be implemented into the engine?
The text was updated successfully, but these errors were encountered: