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

Export generics #2528

hadley opened this issue Apr 19, 2018 · 3 comments

Export generics #2528

hadley opened this issue Apr 19, 2018 · 3 comments


Copy link

@hadley hadley commented Apr 19, 2018

From Kurt Hornik:

You may have seen that from R 3.5.0 onwards searching for S3 methods
uses the registry after hitting topenv and before the search path, and
there is also a way of not using the search path at all, which can be
achieved by setting R_S3_METHOD_LOOKUP_BASEENV_AFTER_GLOBALENV_=true in
the environment. The Debian regular checks are currently performed with
this setting.

This shows S3 method lookup problems in about 250 CRAN packages, mostly
simply due to packages failing to register S3 methods when they could
and should. However, there are also cases when this is not possible:
R-exts says in "Registering S3 methods",

To ensure that these methods are available the packages defining the
methods should ensure that the generics are imported and register the
methods using 'S3method' directives.

which of course needs that the generics are exported.

Now, apparently several packages see the need to provide S3 methods for
the generics


which ggplot2 provides but does not export: my current list is



Would it be possible for ggplot2 to export these generics, so that the
above exports could be turned into proper S3 method registrations?

@tidyverse tidyverse deleted a comment from smouksassi Apr 19, 2018
Copy link
Member Author

@hadley hadley commented Apr 24, 2018

Hadley to notify maintainers.

@hadley hadley added the feature label Apr 27, 2018
@hadley hadley added this to the v2.3.0 milestone Apr 27, 2018
@hadley hadley closed this in 3f0e860 May 1, 2018
Copy link
Member Author

@hadley hadley commented May 1, 2018

@wmurphyrd @thomasp85 @Ax3man @haleyjeppson: please note than in the next release of ggplot2 you'll be able to properly provide S3method declarations in your NAMESPACE.

Copy link

@lock lock bot commented Oct 28, 2018

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue.

@lock lock bot locked and limited conversation to collaborators Oct 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant