Skip to content
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

GH-45521: [CI][Dev][R] Install required cyclocomp package to be used with R lintr #45524

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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("lintr@3.1.2")
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')"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this if we pin lintr to 3.1.2?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to pin here to 3.1.2, CRAN says is not available:

2025-02-13T13:40:04.1633160Z #15 0.292 > install.packages('lintr@3.1.2')
2025-02-13T13:40:04.3161054Z #15 0.294 Installing package into '/usr/local/lib/R/site-library'
2025-02-13T13:40:04.3161668Z #15 0.294 (as 'lib' is unspecified)
2025-02-13T13:40:11.3252442Z #15 7.454 Warning message:
2025-02-13T13:40:11.3253097Z #15 7.454 package 'lintr@3.1.2' is not available for this version of R
2025-02-13T13:40:11.3253653Z #15 7.454 
2025-02-13T13:40:11.3254046Z #15 7.454 A version of this package for your version of R might be available elsewhere,
2025-02-13T13:40:11.3254443Z #15 7.454 see the ideas at
2025-02-13T13:40:11.3254875Z #15 7.454 https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages 
2025-02-13T13:40:11.3255293Z #15 7.454 > 
2025-02-13T13:40:11.3255459Z #15 7.454 > 

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, the .github/workflows/r.yml change isn't related to this change.

I thought that the pin in r.yml suppressed the lint error. But the lint error was caused by missing cyclocomp. (Found unused settings in config file (.lintr): unused_settings is just a warning. It's not an error.)


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