You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are no proper way to deprecate methods/objects.
The common way is to add a comment like # TODO: Remove after 0.28.0 but the end user won't be informed of this future breaking-change when compiling its program. (S)he will only notice the missing object/methods when using the new release that remove them, and has to read the CHANGELOG to figure out what breaking-change is the source of this, and what to do.
Solution
C# has the Obsolete annotation for deprecation, java has @Deprecated
An annotation can be used to deprecate method and objects, along with a deprecation message:
@[Deprecated("will be removed in 0.28.0, use `new_method` instead")]
defold_methodend
This will print a colored deprecation notice like: Deprecated: old_method: will be removed in 0.28.0, use `new_method` instead"
This could also add a deprecation message below the method in the generated docs.
The text was updated successfully, but these errors were encountered:
I guess we can consider this issue solved with #7661 and all the other PRs @bcardiff 😄
This functionality was implemented faster than I thought. A sign that Crystal is gaining stability and approaching to 1.0?
There are no proper way to deprecate methods/objects.
The common way is to add a comment like
# TODO: Remove after 0.28.0
but the end user won't be informed of this future breaking-change when compiling its program. (S)he will only notice the missing object/methods when using the new release that remove them, and has to read theCHANGELOG
to figure out what breaking-change is the source of this, and what to do.Solution
C# has the
Obsolete
annotation for deprecation, java has@Deprecated
An annotation can be used to deprecate method and objects, along with a deprecation message:
This will print a colored deprecation notice like:
Deprecated: old_method: will be removed in 0.28.0, use `new_method` instead"
This could also add a deprecation message below the method in the generated docs.
The text was updated successfully, but these errors were encountered: