Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compatibility with R <4.1/4.2 #317

Merged
merged 6 commits into from
Aug 3, 2024
Merged

Fix compatibility with R <4.1/4.2 #317

merged 6 commits into from
Aug 3, 2024

Conversation

brownag
Copy link
Member

@brownag brownag commented Jun 24, 2024

This PR fixes some syntax in recent additions for compatibility with R versions less than 4.2.

Currently usage of the base pipe |> (R 4.1) and underscore placeholder _ (R 4.2) in code and examples leads to parsing issues that prevent installing/loading/checking packages on earlier versions of R. Our current minimum R supported version is 3.5. We run continuous integration checks on R 3.6.

Recently a few suggested packages related to documentation/testing (testthat, rmarkdown, knitr, evaluate) have been bumped to R 4.0 minimum to conform with new "tidyverse" guidelines. These packages can be safely skipped, as they only pertain to certain development-related use cases. Eventually we may need to increase minimum R required version when required (imported) packages increase, but for now we can safely install and check on R < 4.0 by ignoring these packages in the CI.

From my view we should probably support R 3.6 for a while longer, as it is still out there in the wild on platforms that are not as easily updated. For instance many folks may have containers or HPC systems with access to just standard repositories. As an example R 3.6.3 is the default r-base package available on Ubuntu 20.04 LTS, which is still supported for the time being (about another year).

- try no-build/ignore vignettes on R 3.6
 - try `--no-build-vignettes` in `build_args`
- add `--no-tests` to check args for R 3.6
@brownag
Copy link
Member Author

brownag commented Jun 24, 2024

w/ d35e601 CI for R 3.6 skips dependencies on tidyverse packages that require R >=4.0

Copy link
Member

@dylanbeaudette dylanbeaudette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only suggestion is to consider using extra newlines with (>2x) nested function calls, as a compromise. For example:

lapply(
split(), 
function(i) {
...
}
)

@smroecker : do you have any external tests to double-check?

@brownag
Copy link
Member Author

brownag commented Jun 25, 2024

My only suggestion is to consider using extra newlines with (>2x) nested function calls, as a compromise. For example:

I cleaned up some of the syntax and whitespace here: 085d4bd

Also fixed a couple deprecation messages that said old function names "will be" deprecated--if we use .Deprecated() they are deprecated already.

@dylanbeaudette
Copy link
Member

Perfect, thanks!

@smroecker
Copy link
Member

Looks good. Thanks for making the changes Andrew!

@brownag brownag merged commit 23d4b2c into master Aug 3, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants