Skip to content

Commit

Permalink
GH-45521: [CI][Dev][R] Install required cyclocomp package to be used …
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
raulcd authored and amoeba committed Feb 21, 2025
1 parent fed7eb7 commit 61092d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,9 @@ jobs:
)
# we use pak for package installation since it is faster, safer and more convenient
pak::local_install()
pak::pak("lintr")
# Pin the lintr version to avoid breaking changes with newer 3.2.0 version
# See: https://github.com/apache/arrow/pull/45524
pak::pak("[email protected]")
lintr::expect_lint_free()
- name: Dump install logs
shell: cmd
Expand Down
1 change: 1 addition & 0 deletions ci/docker/linux-apt-lint.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ RUN cat /arrow/ci/etc/rprofile >> $(R RHOME)/etc/Rprofile.site
RUN echo "MAKEFLAGS=-j$(R -s -e 'cat(parallel::detectCores())')" >> $(R RHOME)/etc/Renviron.site
# We don't need arrow's dependencies, only lintr (and its dependencies)
RUN R -e "install.packages('lintr')"
RUN R -e "install.packages('cyclocomp')"

# Docker linter
COPY --from=hadolint /bin/hadolint /usr/bin/hadolint
Expand Down

0 comments on commit 61092d1

Please sign in to comment.