tidyquery icon indicating copy to clipboard operation
tidyquery copied to clipboard

Do not truncate function arguments in output of `show_dplyr()`

Open ianmcook opened this issue 3 years ago • 3 comments

~~This is now enabled by https://github.com/r-lib/rlang/pull/897~~

ianmcook avatar Mar 30 '21 13:03 ianmcook

Previously, in the dplyr code printed by show_dplyr(), calls to functions with more than five arguments were truncated. All arguments after the fifth were replaced with .... This was caused by a limitation of the function rlang::expr_deparse(). Now that function has an optional argument max_elements that can be set to NULL to never truncate arguments. tidyquery now detects whether or not the version of rlang that is loaded supports this max_elements argument, and if it does, it sets it to NULL to never truncate.

ianmcook avatar Mar 30 '21 14:03 ianmcook

Quoting this comment: https://github.com/ianmcook/tidyquery/commit/cd937dcbd2c06f1bbc5d0050a126798bfc2d7f4f#commitcomment-49801825

I have removed the max_elements argument because it will interfere with r-lib/rlang#1173.

Luckily it looks like you can easily do without that argument by calling map(dots, expr_deparse) and then assembling the results yourself.

ianmcook avatar Aug 07 '21 16:08 ianmcook

I removed the code that passed max_elements to expr_deparse() in 23f291d573de8c2700652a138604905fc41989f6

ianmcook avatar Dec 02 '21 19:12 ianmcook