Workarounds for R bugs that can be dropped
The tidyverse supports four previous versions of R, so we'll drop some workarounds for some R bugs at some stage:
- [x] The workaround in
parse_transform_serialize_r()introduced with 5523a8f1b20c8b26d06dc187d5556cf2abdd1c67 ingetRversion() < 3.4was not required in R 3.4 anymore. - [x] The extra parsing in
get_parse_data()introduced in #216 is fixed since R 3.5.2 (bug 16041, https://cran.r-project.org/doc/manuals/r-release/NEWS.html), we don't need another extra round of parsing after this version. - [x] The transformer subsetting introduced in 9c4fc1eda8bcc0e56f88537e21cd93dafa35919f with
if (getRversion() >= 3.6)forforce_assignment_op()is not needed with R 3.6 anymore. - [ ] Fixing parse data for
0xnot needed in R 4.1 anymore.
*checked: already removed in the default branch
Is it sufficient to search the code for getRversion() to find all workarounds?
Not sure because we also at some point introduced the notion of a parser version, see parser_version_find(), which was probably a mistake. We could add a "unit test" using https://github.com/r-hub/rversions to determine the last four supported versions and make sure there are no workarounds for package versions smaller than this set.
The workaround in parse_transform_serialize_r() introduced with https://github.com/r-lib/styler/commit/5523a8f1b20c8b26d06dc187d5556cf2abdd1c67 in getRversion() < 3.4 was not required in R 3.4 anymore.
I think this has been already removed, since there is no more getRversion() < 3.4 in this file.