Repository navigation
Load xml2 for JunitReporter under _R_CHECK_SUGGESTS_ONLY_ - #40
Merged
Merged
Conversation
Co-authored-by: Claude Code <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Maintainer validation is still needed for the R CMD check startup and library-isolation assumptions, external Codecov upload behavior, and the potential for globally loading xml2 to mask undeclared dependencies.
No open issues 🎉
What changed in this PR
This pull request updates the Codecov Test Analytics integration so JunitReporter can load xml2 during Bioconductor checks using _R_CHECK_SUGGESTS_ONLY_, while retaining the existing reporter fallback.
Changes:
- Passes the workflow-installed
xml2library to the test process. - Loads
xml2without modifying.libPaths(). - Documents the workaround and fallback behavior in ADR 0014.
- Requires follow-up for the moderate concern that globally loading
xml2may expose it and its imported namespaces to package tests, weakening undeclared-dependency checking.
| File | Summary |
|---|---|
.github/workflows/bioccheck.yml |
Configures xml2 loading for JUnit reporting and passes its installation library into R CMD check; the global namespace loading behavior has an unresolved dependency-isolation concern. |
docs/adr/0014-codecov-test-analytics.md |
Documents the _R_CHECK_SUGGESTS_ONLY_ workaround, library-loading behavior, and fallback when xml2 is unavailable. |
Review effort: Lite
Co-authored-by: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #39, which wrote no
junit.xmlin practice (seen in waldronlab/bugphyzz#278, where a failing test should have been uploaded).The Bioconductor container sets
_R_CHECK_SUGGESTS_ONLY_=true, so R CMD check runs the tests with a library of only the package's declared dependencies.xml2, whichJunitReporterneeds, is usually not among them, and the guard added in #39 then skipped the hook.The hook now loads the
xml2namespace from the library the workflow installed it in, passed asTESTTHAT_JUNIT_XML2_LIB, without adding that library to.libPaths(), so undeclared dependencies are still exposed. ADR 0014 is updated to match.Tested in
bioconductor/bioconductor_docker:develthrough rcmdcheck, using the step scripts extracted from this workflow:junit.xmlwith 4 testcases and 1 failure, check output unchangedConfig/testthat/parallel: true: same.libPaths()in the tests unchanged, and an undeclared site package (DT) still invisiblexml2not loadable: nojunit.xml, check unchanged🤖 Generated with Claude Code