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
{{ message }}
Repository navigation
Allow a package to be re-sourced while methods are out of sync with a changed generic #726
One last note: when you change a generic() it's nice to be able to still successfully source the whole package so that you can fix methods one-by-one, rather than having to update them all before your package re-loads successfully.
Today, changing a generic's interface makes method<- error at registration time via check_method(), so devtools::load_all() (and installation) fails until every method has been updated. The errors come from:
A generic without ...: method formals must match the generic's formals exactly.
The method's leading arguments must match the generic's dispatch args, in order.
Dispatch args must not have default values.
(Argument additions and default-value changes are already only warnings.)
Whatever the design, R CMD check should still surface the inconsistency loudly; the goal is only to keep the package sourceable mid-refactor.
Activity
hadley commentedon Jul 27, 2026
Maybe warn instead of erroring if
pkgload::is_loading()isTRUE. What do you think @t-kalinowski ?Update evolution vignette for #726, #728, #729 fixes
Only check method/generic consistency in development contexts (RConso…