callr icon indicating copy to clipboard operation
callr copied to clipboard

Overwritten S3 methods when pak is loaded before callr

Open DavisVaughan opened this issue 1 year ago • 2 comments

x <- pak::pkg_list()
x <- callr::r(function() {})
#> Registered S3 methods overwritten by 'callr':
#>   method                    from
#>   format.callr_status_error     
#>   print.callr_status_error

I imagine it has something to do with this https://github.com/r-lib/pak/blob/580b158493e11f459c0f38a0c3eff77afc018a64/R/subprocess.R#L255-L268

And then callr unconditionally reregisters them here https://github.com/r-lib/callr/blob/e3e0acffdd817bb1c0f7fc5054f93b1d65ed8a45/R/error.R#L148

DavisVaughan avatar May 12 '23 01:05 DavisVaughan