Skip to content

CI: remove unsupported max_errors arg from package check#71

Closed
Copilot wants to merge 3 commits into
masterfrom
copilot/fix-ci-job-70
Closed

CI: remove unsupported max_errors arg from package check#71
Copilot wants to merge 3 commits into
masterfrom
copilot/fix-ci-job-70

Conversation

Copy link
Copy Markdown

Copilot AI commented May 30, 2026

The PR workflow was failing before package checks executed because devtools::check(max_errors = 5) is incompatible with the CI toolchain (unused argument (max_errors = 5)). This change restores check-step compatibility while preserving current CI flow.

  • Problem

    • Check package step in .github/workflows/ci.yaml passed an unsupported argument through devtools::check.
  • Change

    • Updated only the Check package command to use the supported invocation.
    • Left all other workflow steps and ordering unchanged.
  • Patch

    - name: Check package
      run: Rscript -e 'devtools::check()'
Original prompt

Fix the failing CI job for pull request #70 in repository gforge/Gmisc.

Context:

  • The failing job ID is 78645497689.
  • The job logs show the package check step fails with:
    • Error in pkgbuild::build(pkg$path, tempdir(), args = build_args, quiet = quiet, : unused argument (max_errors = 5)
  • The failing workflow file is .github/workflows/ci.yaml at commit 989195023c5978a9afdfdfba07825ae265ffb5a9.
  • The current failing step is:
    • Rscript -e 'devtools::check(max_errors = 5)'
  • This indicates the CI workflow is passing an unsupported argument through devtools::check, causing the workflow itself to fail before the package check can run.

Task:

  1. Update the workflow to remove or replace the unsupported max_errors = 5 usage.
  2. Prefer the minimal safe fix unless repository context suggests a better established pattern.
  3. Keep the rest of the workflow behavior unchanged.
  4. Open a pull request with the fix.

Suggested implementation:

  • Change the Check package step in .github/workflows/ci.yaml from:
    • Rscript -e 'devtools::check(max_errors = 5)'
  • To:
    • Rscript -e 'devtools::check()'

Acceptance criteria:

  • The workflow no longer fails due to unused argument (max_errors = 5).
  • The resulting PR clearly explains that the fix restores compatibility with the CI environment's installed R package tooling.
  • Only the necessary workflow file is changed unless another small adjustment is required to make the fix correct.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Please find a solution for failing job 78645497689. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.

Assistant: The failure is caused by the workflow invoking devtools::check(max_errors = 5), but the installed toolchain resolves that call down to pkgbuild::build(...), which does not accept max_errors. The error is in the workflow definition itself, not your package code.

Fix the check step in .github/workflows/ci.yaml:

  • Current failing line: Check package step in ci.yaml
  • Failing command: Rscript -e 'devtools::check(max_errors = 5)'

Use one of these fixes:

- name: Check package
  run: Rscript -e 'devtools::check()'

If you want to limit visible failures, do it through check args instead of max_errors:

- name: Check package
  run: Rscript -e 'devtools::check(args = c("--no-manual"))'

If you want a more CI-stable approach, prefer rcmdcheck directly:

- name: Install R package dependencies
  run: |
    Rscript -e 'install.packages(c("devtools","remotes","lintr","covr","pkgdown","testthat","rmarkdown","bench","vdiffr","rcmdcheck"))'

- name: Check package
  run: Rscript -e 'rcmdcheck::rcmdcheck(args = c("--no-manual"), error_on = "warning")'

Recommended minimal patch:

-      - name: Check package
-        run: Rscript -e 'devtools::check(max_errors = 5)'
+      - name: Check package
+        run: Rscript -e 'devtools::check()'

Why this solves it:

  • The log shows: unused argument (max_errors = 5)
  • That means the current version/API in CI does not support that argument path.
  • Removing max_errors restores compatibility and should let the package check actually run.

User: Implement

Assistant: I’m waiting for your confirmation on the proposed repository change so I can continue and open the fix PR.

This pull request was created from Copilot chat.

Copilot AI changed the title [WIP] Fix failing CI job for pull request #70 CI: remove unsupported max_errors arg from package check May 30, 2026
Copilot finished work on behalf of gforge May 30, 2026 11:37
Copilot AI requested a review from gforge May 30, 2026 11:37
@gforge gforge closed this May 30, 2026
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.

2 participants