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

[R-package] RFC: require R >= 3.5.0 #3212

Closed
jameslamb opened this issue Jul 7, 2020 · 2 comments
Closed

[R-package] RFC: require R >= 3.5.0 #3212

jameslamb opened this issue Jul 7, 2020 · 2 comments

Comments

@jameslamb
Copy link
Collaborator

I'm opening this request for comment as part of the changes we're considering for LightGBM 3.0.0 (#3071 ).

I'd like to propose the following:

as of LightGBM 3.0.0, the R package cannot be used with R versions older than 3.5.0.

How this makes LightGBM better

Today, we maintain a couple places in the code for the R package which are if-else blocks checking whether you are on a version of R earlier than R 3.5.0

  • OPTION(USE_R35 "Set to ON if your R version is not earlier than 3.5" OFF)
  • #ifdef R_VER_ABOVE_35
    #define NAMED_BITS 16
    struct lgbm_sxpinfo {
    unsigned int type : 5;
    unsigned int scalar : 1;
    unsigned int obj : 1;
    unsigned int alt : 1;
    unsigned int gp : 16;
    unsigned int mark : 1;
    unsigned int debug : 1;
    unsigned int trace : 1;
    unsigned int spare : 1;
    unsigned int gcgen : 1;
    unsigned int gccls : 3;
    unsigned int named : NAMED_BITS;
    unsigned int extra : 32 - NAMED_BITS;
    };
    // 64bit pointer
    #if INTPTR_MAX == INT64_MAX
    typedef int64_t xlen_t;
    #else
    typedef int xlen_t;
    #endif
    #else
  • if (R_ver >= 3.5) {
    cmake_args <- c(cmake_args, "-DUSE_R35=ON")
    }

Removing this support would simplify the R package's code, reducing the risk of mistakes and the maintenance burden. This simplification would also make implementing #3016 easier.

Why I think the impact to users will be minimal

R 3.5.0 was released more than 2 years ago, in April 2018 (version history).

In all of the R-package bug reports submitted by our users in the last 6 months, people have been using R version 3.5 or later

Note for reviewers

In addition to maintainers, I'd love comments from some of the people who have helped the R package by opening issues and pull requests: @mayer79 @rgranvil

@mayer79
Copy link
Contributor

mayer79 commented Jul 7, 2020

I remember there where some troubles when R 3.5 was being released.

I think in this case it is fully justified to require R >= 3.5, even if one or the other company might still rely on older R versions (with old versions of LightGBM, probably, so no real issue).

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants