Fix R CMD check on Windows: propagate .libPaths() to PSOCK eFDR workers#50
Open
ZoliQua wants to merge 1 commit into
Open
Fix R CMD check on Windows: propagate .libPaths() to PSOCK eFDR workers#50ZoliQua wants to merge 1 commit into
ZoliQua wants to merge 1 commit into
Conversation
…fore library(mulea); fixes R CMD check vignette build on Windows. Bump to 1.1.2 + NEWS
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.
Problem
set_based_enrichment_test()runs the resampling eFDR on a PSOCK cluster and loads the package oneach worker with
clusterEvalQ(cl, library("mulea")). PSOCK workers are fresh R sessions that donot inherit the parent's
.libPaths(). Whenmuleais not on a worker's default library tree —most notably the temporary
*.Rchecklibrary used duringR CMD check—library("mulea")failson the workers and the whole call aborts.
In practice this breaks
R CMD checkon Windows, where re-building the vignette (mulea.Rmd,which runs eFDR with
nthreads = 2) fails with:Unix workers happen to pick up the check library via the inherited
R_LIBSenvironment, so thefailure is Windows-specific, but the underlying cluster setup is fragile on every platform.
Fix
Capture the host's library paths, export them to the workers, and set them before loading the
package:
One file changed (
R/set-based-enrichment-test.r), plus aNEWS.mdentry and a patch version bump.Why it is safe
The change only affects how the workers locate the package. It does not touch the RNG, the
per-thread seeding (
seeds_per_thread), the C++ simulation, or any arithmetic, so eFDR results areunchanged. In normal installed use the workers already resolve
library("mulea")via the defaultlibrary path, so this is purely a check/build-robustness fix with no behavioural change for users.
Verification
ora(..., p_value_adjustment_method = "eFDR", nthreads = 2)runs withouterror and its
p_valuecolumn is byte-identical to the serial (nthreads = 1) path.R-CMD-checkmatrix now passes on windows-latest (previously failing on the vignetterebuild), alongside ubuntu-latest release/devel and macOS.