ropensci / jqr

R interface to jq
https://docs.ropensci.org/jqr
Other
143 stars 13 forks source link

Compatibility with magrittr 2.0 #82

Closed lionel- closed 3 years ago

lionel- commented 3 years ago

We're about to release magrittr 2.0 and a jqr failure appeared in our last round of revdep checks. I'm not sure why it didn't show up earlier, so I'm sorry for the late heads up.

The internals have changed and this is causing issues for pipeline_on_exit(). I've come up with a workaround using on.exit() returnValue(), and return(). This works with both magrittr 1.5 and 2.0.

Note that the pipeline_info() routine is not 100% correct and in some circumstances might change the return value in unintended frames. More generally, changing the return value of a pipeline from downstack is a bit magical and might cause confusion for R users trying to understand the semantics of their tools. Finally, this will not work with the base pipe to be included in R 4.1.

sckott commented 3 years ago

Thanks @lionel- !

Is there anyway to get rid of the r check note about .jq_exitfun https://travis-ci.org/github/ropensci/jqr/jobs/742946612#L551 ?