-
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] [ci] remove unnecessary include in linear_tree_learner (fixes #6264) #6265
Conversation
🎉 I was able to reproduce the warning from CRAN in CI! https://github.com/microsoft/LightGBM/actions/runs/7497815594/job/20411976864?pr=6265 Now we can push potential fixes here and use that to test. |
Nevermind, I decided to revert this. The less we change in the next release, the lower the risk of CRAN finding an issue and archiving the package. |
@guolinke @shiyu1994 could you please help with a review? I'd like to merge this and then begin a 4.3.0 release as soon as possible, to minimize the risk of the package being archived on CRAN. |
echo "install logs:" | ||
echo "" | ||
cat lightgbm.Rcheck/00install.out | ||
echo "" |
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.
Without this, compiler invocations and most warnings are not visible in CI logs because R CMD check
redirects them to this file instead of printing them.
I think this will be generically useful for CI in the future, and in fact we already do that for most other R CI jobs:
LightGBM/.ci/test_r_package.sh
Lines 226 to 232 in 2e3543c
echo "R CMD check build logs:" | |
BUILD_LOG_FILE=lightgbm.Rcheck/00install.out | |
cat ${BUILD_LOG_FILE} | |
if [[ $check_succeeded == "no" ]]; then | |
exit -1 | |
fi |
FWIW: I am the main author of GPBoost which includes a fork of LightGBM. I got the same warning from CRAN and adapted it as suggested in this commit (simply dropping Thanks, we now see with clang 18: |
Thanks for posting @fabsig ! I still believe we should try to submit a version of LightGBM with this PR on it to CRAN. I'm confident in the change because the new CI jobs added here raised the same compilation warning + Maybe there are other sources of this warning in GPBoost... different paths or order of includes, different uses of @guolinke @shiyu1994 could you please help with a review today? I'd like to try to submit to CRAN tonight. We only have 7 more days to fix this before the package is archived there. |
thanks @guolinke ! |
@jameslamb: I did indeed have a different version of |
Glad it helped @fabsig ! I submitted a version of Including, most notably, that the |
Fixes #6264.
Please see the linked issue for details. In short, CRAN has begun testing projects using
clang-18
(which is not yet released) targetinglibc++-18
instead of the system C++ stdlib. Those checks resulted in this compiler warning:If we don't submit a fix before January 24,
{lightgbm}
will be archived on CRANThis PR proposes the following:
Notes for Reviewers
It appears that the underlying issue was "
linear_tree_learning.h
includes<string>
unnecessarily". I guess that leadsclang
to expand a template infmt/core.h
to many unnecessary types, some of which are considered deprecated in v18 of libc++.I think?
I'm not really sure, but I do know that: