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
This now has come up in #3798 and #5961 and the gist of it is that we have a procedure for managing lifecycles of functions, but we don't have an equivalent for ggproto classes.
We don't use GeomCol and maybe soon GeomErrorbarh anymore in ggplot2, but they are still in use by extensions. We can see for example that GeomCol is used in {ichimoku}, {entropart}, {ggiraph}, {ggside}. or that GeomErrorbarh is used in {errors} and {ggiraph}. Having a deprecation mechanism in place allows us to discourage the use of these classes while not breaking other packages.
Generally speaking, I think there are 3 ways in which ggproto classes are used in other packages::
They may be subclassed in an extension class.
They may be provided as arguments in e.g. layer(geom = GeomCol, ...).
They're used for accessing fields, .e.g. GeomCol$default_aes.
The question of this issue is whether we can find a satisfactory way to deprecate these old classes. I think it would be relatively straightforward to throw deprecation messages in cases (1) and (2) via either ggproto() or check_subclass(). I'm not sure (3) can be caught in an easy fashion.
The text was updated successfully, but these errors were encountered:
Just to jot down some notes regarding topics discussed off-github;
We should ensure symmetry at the check_subclass() (unsed in layer()) level, so that it can find classes based on constructors even if the class itself is absent. This would ensure that layer(geom = "col") will find GeomBar and layer(geom = "errorbarh") will find GeomErrorbar.
Finding a class based on the constructor name is much slower than based on the class name, so probably we should only use it as a fallback.
This now has come up in #3798 and #5961 and the gist of it is that we have a procedure for managing lifecycles of functions, but we don't have an equivalent for ggproto classes.
We don't use
GeomCol
and maybe soonGeomErrorbarh
anymore in ggplot2, but they are still in use by extensions. We can see for example thatGeomCol
is used in {ichimoku}, {entropart}, {ggiraph}, {ggside}. or thatGeomErrorbarh
is used in {errors} and {ggiraph}. Having a deprecation mechanism in place allows us to discourage the use of these classes while not breaking other packages.Generally speaking, I think there are 3 ways in which ggproto classes are used in other packages::
layer(geom = GeomCol, ...)
.GeomCol$default_aes
.The question of this issue is whether we can find a satisfactory way to deprecate these old classes. I think it would be relatively straightforward to throw deprecation messages in cases (1) and (2) via either
ggproto()
orcheck_subclass()
. I'm not sure (3) can be caught in an easy fashion.The text was updated successfully, but these errors were encountered: