-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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] move R source files into R-package, reduce duplication in build_r.R #3087
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some other files that should be updated:
https://github.com/microsoft/LightGBM/blob/master/CMakeLists.txt
https://github.com/microsoft/LightGBM/blob/master/.github/CODEOWNERS
I don't think anything in Good catch on https://github.com/microsoft/LightGBM/blob/master/.github/CODEOWNERS#L18-L20 |
Currently looking into this
Here's the relevant source code in |
it was this: cpplint/cpplint#139 The fix is using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Removing my "changes requested" review status.
… build_r.R (microsoft#3087) * [R-package] move R source files into R-package * fix linting warning * stuff
… build_r.R (microsoft#3087) * [R-package] move R source files into R-package * fix linting warning * stuff
This pull request 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. |
In this PR, I propose moving the R-specific C++ source files into the
R-package
directory. For CRAN builds, it's necessary for those files to be at the root level of the R-package'ssrc/
directory (notsrc/src/
like we currently use when we copy in files).R CMD BUILD
automatically compiles any.c
,.cc
, or.cpp
files it finds insrc/
.I also think there's a nice organizational benefit to having as much of the R package's code inside
R-package/
as possible.This PR also proposes some simplifications to
build_r.R
. We were repeating the string literal"lightgbm_r"
a lot, and I think it would be better to store it in one constant at the top of the script.This is only moving files around and will not change anything for our users.
How this helps us get to CRAN
This is the next PR on the road to #629 . I'm working on #2960 in my fork. That PR includes build steps for the R package which only use the CRAN toolchain (e.g. no Visual Studio, no CMake).
That PR on my fork right now has a large diff that would be difficult to review, and it needs a bit more work. So I'd like to propose the first batch of changes here.