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

[CI][R] Lint failure #45521

Closed
kou opened this issue Feb 13, 2025 · 3 comments
Closed

[CI][R] Lint failure #45521

kou opened this issue Feb 13, 2025 · 3 comments

Comments

@kou
Copy link
Member

kou commented Feb 13, 2025

Describe the bug, including details regarding any error messages, version, and platform.

It's caused by #44989 merge. Sorry.

https://github.com/apache/arrow/actions/runs/13299364571/job/37137873622#step:8:6733

> lintr::lint_package('/arrow/r')
Error in `lint()`:
! Linter `linter()` failed in '/arrow/r/data-raw/docgen.R':
Caused by error in `linter_fun()`:
! Cyclocomp complexity is computed using `cyclocomp::cyclocomp()`.
ℹ Please install the needed cyclocomp package.
Backtrace:
     ▆
  1. └─lintr::lint_package("/arrow/r")
  2.   └─lintr::lint_dir(...)
  3.     └─base::lapply(...)
  4.       └─lintr (local) FUN(X[[i]], ...)
  5.         └─lintr::lint(file, ..., parse_settings = FALSE, exclusions = exclusions)
  6.           ├─base::withCallingHandlers(...)
  7.           └─lintr:::get_lints(...)
  8.             ├─lintr:::flatten_lints(linter_fun(expr))
  9.             │ └─lintr:::flatten_list(x, class = "lint")
 10.             │   └─lintr (local) assign_item(x)
 11.             └─lintr (local) linter_fun(expr)
 12.               └─cli::cli_abort(...)
 13.                 └─rlang::abort(...)
Warning message:
Found unused settings in config file (.lintr): unused_settings 

Component(s)

Continuous Integration, R

@kou
Copy link
Member Author

kou commented Feb 13, 2025

@amoeba Could you fix this...?

@raulcd
Copy link
Member

raulcd commented Feb 13, 2025

This is related to the new version of lintr which makes cyclocomp not a required dependency anymore:
https://github.com/r-lib/lintr/releases/tag/v3.2.0

raulcd added a commit to raulcd/arrow that referenced this issue Feb 13, 2025
kou pushed a commit that referenced this issue Feb 16, 2025
…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]>
@kou
Copy link
Member Author

kou commented Feb 16, 2025

Issue resolved by pull request 45524
#45524

@kou kou added this to the 20.0.0 milestone Feb 16, 2025
@kou kou closed this as completed Feb 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants