r-lib / processx

Execute and Control Subprocesses from R
https://processx.r-lib.org/
Other
232 stars 43 forks source link

`$call` should be a call or `NULL` in error objects #360

Open gaborcsardi opened 1 year ago

gaborcsardi commented 1 year ago
❯ processx::run("false")
Error in `processx::run("false")`:
! System command 'false' failed
---
Exit status: 1
Stderr: <empty>
---
Type .Last.error to see the more details.

❯ .Last.error$call
[1] "processx::run(\"false\")"

So we should use another field for the call string.

lionel- commented 1 year ago

Or maybe just zap the srcrefs if that is the problem?

gaborcsardi commented 1 year ago

It is not the only problem, calls may contain large objects.

lionel- commented 1 year ago

Supplying a string can be generally useful for non-call contexts. Should we use the field $context? We've also started namespacing fields inside $rlang for $rlang$inherit, I guess that'd be a good idea here too.