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
Found while verifying scenarios for the evolution vignette (#143).
When pkgA changes the default value of a non-dispatch argument of a generic, every downstream method that spells out the old default triggers the default-mismatch warning from check_method():
Warning: In gen(<pkgB::BClass>), default value of `drop` is not the same as the generic
- Generic: TRUE
- Method: FALSE
This warning fires when pkgB is installed (an R CMD check WARNING via "significant warnings") and again on every load (a check NOTE). Unlike adding an argument — where a method can include the new argument ahead of time and is silently accepted by both old and new generic — there is no version of the method that is warning-free under both versions of pkgA: whichever default it picks disagrees with one of them. So pkgA can't change a default without making every downstream package's checks noisy for the duration of the transition, no matter how cooperative the downstream authors are.
Maybe we only fire this when running R CMD check for pkgB or under pkgload? (i.e. _R_CHECK_PACKAGE_NAME_)
Related: because dispatch passes the method's formals, the method's default is what callers actually get, so these mismatches are genuine behavioral drift — whatever mechanism we pick should preserve that signal.
changed the title [-]No warning-free way for a downstream method to survive a change to a generic argument's default[/-][+]Can't change default arguments[/+]on Jul 27, 2026
Activity
[-]No warning-free way for a downstream method to survive a change to a generic argument's default[/-][+]Can't change default arguments[/+]Update evolution vignette for #726, #728, #729 fixes
Only check method/generic consistency in development contexts (RConso…