Skip to content

Handle _R_CHECK_DEPENDS_ONLY_ correctly for other.Rraw to work in -occasional CI#7832

Open
MichaelChirico wants to merge 7 commits into
other-attach-orderfrom
occasional-fix
Open

Handle _R_CHECK_DEPENDS_ONLY_ correctly for other.Rraw to work in -occasional CI#7832
MichaelChirico wants to merge 7 commits into
other-attach-orderfrom
occasional-fix

Conversation

@MichaelChirico

Copy link
Copy Markdown
Member

This should resolve the main issue with other.Rraw failing broadly.

This GHA-only fix was diagnosed and fixed by Gemini (to be precise: any change written by Gemini is kept pristine and annotated in the commit message). That diagnosis (lightly edited) follows:


Setting _R_CHECK_DEPENDS_ONLY_: false in .github/workflows/R-CMD-check-occasional.yaml overrides a default behavior of --as-cran in R CMD check that hides optional packages from the test suite:

1. Default Behavior of --as-cran in R CMD check

Under --as-cran, R automatically enables _R_CHECK_DEPENDS_ONLY_=true:

check_args = c("--no-manual", "--as-cran")

When active, R creates a restricted, temporary library (.libPaths()) during the check containing only the packages explicitly listed in DESCRIPTION (Depends, Imports, Suggests, and Enhances), plus base/recommended R packages. Any other packages installed on the system are hidden from the search path during test execution.

2. Why This Broke other.Rraw in CI

In step 82 of R-CMD-check-occasional.yaml, the workflow installs "fully optional packages" (other_pkgs such as caret, dplyr, ggplot2, sf, vctrs, etc.) so they can be tested for interoperability in inst/tests/other.Rraw. These optional packages are intentionally not listed in data.table's DESCRIPTION file.

Because they are omitted from DESCRIPTION, --as-cran stripped them from .libPaths() during check execution. Even though the step successfully installed all 19 optional packages and set TEST_DATA_TABLE_WITH_OTHER_PACKAGES=TRUE, inside R CMD check, other.Rraw could not find them and aborted across all CI runners with:

test.data.table('other.Rraw') failed to attach required package(s): caret, DBI, dplyr, gdata, ggplot2, hexbin, knitr, nanotime, nlme, plyr, RSQLite, sf, vctrs.

3. Effect of the Change

By explicitly setting _R_CHECK_DEPENDS_ONLY_: false, we prevent R CMD check from isolating the check library strictly to DESCRIPTION dependencies. This allows other.Rraw to see and attach the optional packages installed in the runner library during the check.

@MichaelChirico MichaelChirico changed the title Handle _R_CHECK_DEPENDS_ONLY_ correctly for other.Rraw Handle _R_CHECK_DEPENDS_ONLY_ correctly for other.Rraw to work in -occasional CI Jul 23, 2026
@MichaelChirico
MichaelChirico changed the base branch from master to other-attach-order July 23, 2026 22:52
@MichaelChirico
MichaelChirico force-pushed the occasional-fix branch 3 times, most recently from dcbf1f9 to 0dec4cc Compare July 23, 2026 23:17
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
  • HEAD=occasional-fix much slower for as.data.table.array improved in #7019
  • HEAD=occasional-fix much slower for transform improved in #5493
    Comparison Plot

Generated via commit 3829679

Download link for the artifact containing the test results: ↓ atime-results.zip

Task Duration
R setup and installing dependencies 2 minutes and 55 seconds
Installing different package versions 45 seconds
Running and plotting the test cases 8 minutes and 7 seconds

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (other-attach-order@58ce9c4). Learn more about missing BASE report.

Additional details and impacted files
@@                  Coverage Diff                  @@
##             other-attach-order    #7832   +/-   ##
=====================================================
  Coverage                      ?   99.01%           
=====================================================
  Files                         ?       88           
  Lines                         ?    17234           
  Branches                      ?        0           
=====================================================
  Hits                          ?    17065           
  Misses                        ?      169           
  Partials                      ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant