[R-package] [ci] Manually install 'Matrix' (fixes #6433) #6434
+27
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #6433
R 4.4.0 was released 4 days ago. In that same timeframe, the latest version of
{Matrix}
was released with a floor ofDepends: R (>=4.4.0)
.As a result, running
install.packages("Matrix")
on any version of R older than v4.4.0 fails to install{Matrix}
.{lightgbm}
tries to maintain compatibility withR >= 3.6
, so this broke most of this project's CI jobs 🙃This PR tries to fix it by manually installing
{Matrix}
from old sources, as recommended in "Writing R Extensions" (see links in #6433).Notes for Reviewers
Maybe this will be fixed in the future?
I'm not really understanding this discussion on R-devel about it: https://stat.ethz.ch/pipermail/r-devel/2024-April/083383.html.
But there's a suggestion there that maybe in the near future
install.packages("Matrix")
will select an older version when run on versions of R prior to v4.4.0.According to this post on
r-pkg-devel
from 3 weeks ago, this choice of>=4.4.0
for the new{Matrix}
was intentional, but the authors expected that R's tooling would hide that version from older R users: https://stat.ethz.ch/pipermail/r-package-devel/2024q2/010640.html.