Skip to content

Commit

Permalink
mention 'Imports: methods' alternative, with caveats (PR#18540)
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@84688 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
smeyer committed Jul 13, 2023
1 parent a2b5286 commit 0baca8f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions doc/manual/R-exts.texi
Original file line number Diff line number Diff line change
Expand Up @@ -4690,8 +4690,12 @@ standard function @code{c} in @pkg{base}.

Some additional steps are needed for packages which make use of formal
(S4-style) classes and methods (unless these are purely used
internally). The package should have @code{Depends: methods} in its
@file{DESCRIPTION} and @code{import(methods)} or
internally). The package should have
@code{Depends: methods}@footnote{@code{Imports: methods} may suffice,
but package code is little exercised without the @pkg{methods} package
on the search path and may not be fully robust to this scenario.
@c https://bugs.R-project.org/show_bug.cgi?id=18540#c10
} in its @file{DESCRIPTION} and @code{import(methods)} or
@code{importFrom(methods, ...)} plus any classes and methods which are
to be exported need to be declared in the @file{NAMESPACE} file. For
example, the @pkg{stats4} package has
Expand Down

0 comments on commit 0baca8f

Please sign in to comment.