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

Overwritten S3 methods when pak is loaded before callr #254

Open
DavisVaughan opened this issue May 12, 2023 · 2 comments
Open

Overwritten S3 methods when pak is loaded before callr #254

DavisVaughan opened this issue May 12, 2023 · 2 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@DavisVaughan
Copy link
Member

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

callr/R/error.R

Line 148 in e3e0acf

print.callr_status_error <- function(x, trace = TRUE, class = TRUE,

@gaborcsardi gaborcsardi added the bug an unexpected problem or unintended behavior label May 12, 2023
@gaborcsardi
Copy link
Member

gaborcsardi commented Mar 25, 2024

This is going to be fixed once pak stops using the subprocess: r-lib/pak#586
I think. I'll leave this open to check.

@DavisVaughan
Copy link
Member Author

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants