Skip to content

build: upgrade R version to 4.2.0#11223

Closed
batpigandme wants to merge 9 commits intostdlib-js:developfrom
batpigandme:r-version-upgrade
Closed

build: upgrade R version to 4.2.0#11223
batpigandme wants to merge 9 commits intostdlib-js:developfrom
batpigandme:r-version-upgrade

Conversation

@batpigandme
Copy link
Copy Markdown
Member

@batpigandme batpigandme commented Mar 30, 2026


type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes. report:

  • task: lint_filenames status: passed
  • task: lint_editorconfig status: passed
  • task: lint_markdown status: na
  • task: lint_package_json status: na
  • task: lint_repl_help status: na
  • task: lint_javascript_src status: na
  • task: lint_javascript_cli status: na
  • task: lint_javascript_examples status: na
  • task: lint_javascript_tests status: na
  • task: lint_javascript_benchmarks status: na
  • task: lint_python status: na
  • task: lint_r status: na
  • task: lint_c_src status: na
  • task: lint_c_examples status: na
  • task: lint_c_benchmarks status: na
  • task: lint_c_tests_fixtures status: na
  • task: lint_shell status: na
  • task: lint_typescript_declarations status: passed
  • task: lint_typescript_tests status: na
  • task: lint_license_headers status: passed ---

Resolves #10968

Description

What is the purpose of this pull request?

This pull request:

  • Upgrades the version of R used (4.2.0) to lint R files for compatibility with the packages used.

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

I ran all of the tests for packages that had R test fixtures with the following script, and all 107 passed. But, I don't think that's necessarily relevant, since this is a change in CI only.

# Find test.js files in packages that have R fixture scripts
make test-files FILES="$(find lib/node_modules/@stdlib -path '*/test/fixtures/*.R' -exec dirname {} \; | sort -u | while read d; do echo "$(dirname $(dirname "$d"))/test.js"; done | tr '\n' ' ')"

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

Found and fixed mismatched R versions running in lint_random_files workflow.

Assisted-by: Claude-Sonnet-4-6


@stdlib-js/reviewers

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: na
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
Should be undone after. This is done to trigger the GHA with the new version of R.
@github-actions github-actions bot mentioned this pull request Mar 30, 2026
Uses `options( warnPartialMatchDollar = TRUE ); in place of the deprecated `extraction_operator_linter` which was deprecated in lintr 3.2.0.
Use qualified namespaces:
* `default_linters` -> `lintr::default_linters`
* `default_undesirable_functions` -> `lintr::default_undesirable_functions`

Assisted-by: GPT-5-3-Codex

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: na
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: passed
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
Remove deprecated `default_linters` argument from
`linters_with_defaults` call in `linter.R` and align
R version to 4.2.0 in `lint_random_files` workflow.

Assisted-by: Claude Sonnet 4 <noreply@anthropic.com>

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: na
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
@batpigandme
Copy link
Copy Markdown
Member Author

batpigandme commented Mar 31, 2026

R file linting now working. The only error is for checking for a license header in the "bad" example lib/node_modules/@stdlib/_tools/lint/license-header-file-list/test/fixtures/bad/file.R, which doesn't have a license header, since it's the counter example to /fixtures/good/file.R.

{"error":"malformed or missing license header.","name":"lib/node_modules/@stdlib/_tools/lint/license-header-file-list/test/fixtures/bad/file.R"}
make: *** [/home/runner/work/stdlib/stdlib/tools/make/lib/lint/license-headers/Makefile:73: lint-license-headers-files] Error 1
Error: Process completed with exit code 2.

@batpigandme
Copy link
Copy Markdown
Member Author

batpigandme commented Mar 31, 2026

The lint failure makes sense, but now would probably be a good time to address the warning, as well, re the pinned version of the setup R action (r-lib/actions/setup-r@6f6e5bc62fba3a704f74e7ad7ef7676c5c6a2590) which uses Node 20, which will be deprecated for GHA in June.

Warning: Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: r-lib/actions/setup-r@6f6e5bc62fba3a704f74e7ad7ef7676c5c6a2590. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

Note

This is actually an upstream issue, as 6f6e5bc62fba3a704f74e7ad7ef7676c5c6a2590 is the SHA for the latest version of the setup-r action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: need compatible R and lintr versions to avoid error in GHA for R files

1 participant