Skip to content

Commit 43d6f79

Browse files
authored
GH-45521: [CI][Dev][R] Install required cyclocomp package to be used with R lintr (#45524)
### Rationale for this change The linting jobs are failing due to the new version of `lintr` not installing `cyclocomp` anymore. We use `cyclocomp` but this is not part of the default linters of `lintr` anymore. We should install it individually. ### What changes are included in this PR? Install `cyclocomp` as part of setting up the linting environment for R on our linting job. Pin old version of `lintr` for R Windows job as it otherwise fails with a lot of new linter issues. ### Are these changes tested? Yes via CI. ### Are there any user-facing changes? No * GitHub Issue: #45521 Authored-by: Raúl Cumplido <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
1 parent 4e65a94 commit 43d6f79

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎.github/workflows/r.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,9 @@ jobs:
405405
)
406406
# we use pak for package installation since it is faster, safer and more convenient
407407
pak::local_install()
408-
pak::pak("lintr")
408+
# Pin the lintr version to avoid breaking changes with newer 3.2.0 version
409+
# See: https://github.com/apache/arrow/pull/45524
410+
pak::pak("[email protected]")
409411
lintr::expect_lint_free()
410412
- name: Dump install logs
411413
shell: cmd

‎ci/docker/linux-apt-lint.dockerfile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ RUN cat /arrow/ci/etc/rprofile >> $(R RHOME)/etc/Rprofile.site
5858
RUN echo "MAKEFLAGS=-j$(R -s -e 'cat(parallel::detectCores())')" >> $(R RHOME)/etc/Renviron.site
5959
# We don't need arrow's dependencies, only lintr (and its dependencies)
6060
RUN R -e "install.packages('lintr')"
61+
RUN R -e "install.packages('cyclocomp')"
6162

6263
# Docker linter
6364
COPY --from=hadolint /bin/hadolint /usr/bin/hadolint

0 commit comments

Comments
 (0)