DavisVaughan / r-tree-sitter

https://davisvaughan.github.io/r-tree-sitter/
Other
31 stars 2 forks source link

Bump minimum R version to 4.3.0 #6

Closed DavisVaughan closed 6 months ago

DavisVaughan commented 6 months ago

tree-sitter requires C11 and is unlikely to change that https://github.com/tree-sitter/tree-sitter/pull/3339. C99 is old, so that's reasonable.

R's history with C99 is a big gnarly. R is currently at R 4.4.0 (released a month ago). Only as of R 4.3.0 (last year) did package authors gain a way to specify the C std version with USE_Cxx here: https://github.com/wch/r-source/blob/bacd56452465bd7fd95839c3e5dd1adf21be4de6/doc/NEWS.Rd#L1572-L1604

Additionally at that time, there was a change in R on Windows to allow the default C compiler to be used (typically C17 through RTools), rather than always defaulting to C99. For Mac and Linux, it was already doing this (and indeed for me it looks like a pretty new C std is being used): https://github.com/wch/r-source/blob/bacd56452465bd7fd95839c3e5dd1adf21be4de6/doc/NEWS.Rd#L1545-L1548

To try and guarantee Windows C11 support, we are raising the minimum R version to 4.3.0.

I do not feel a need to specify a USE_Cxx field in SystemRequirements, as that specifies "use up to this C standard" and we don't really want that - i.e. see the R NEWS linked above "Use a standard that is at most C17"