We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$ R_FUTURE_PLAN=future.callr::callr R CMD build future.apply * checking for file ‘future.apply/DESCRIPTION’ ... OK * preparing ‘future.apply’: * checking DESCRIPTION meta-information ... OK * installing the package to build vignettes ----------------------------------- * installing *source* package ‘future.apply’ ... ** using staged installation ** R ** inst ** byte-compile and prepare package for lazy loading Error: package or namespace load failed for ‘future’: .onLoad failed in loadNamespace() for 'future', details: call: loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) error: cyclic namespace dependency detected when loading ‘future’, already loading ‘future.callr’, ‘future’ Execution halted ERROR: lazy loading failed for package ‘future.apply’ * removing ‘/tmp/hb/RtmpuGbp1R/Rinst4a9660c92d74/future.apply’ ----------------------------------- ERROR: package installation failed
Have .onLoad() detect when R CMD build is running and unset R_FUTURE_PLAN.
.onLoad()
R CMD build
R_FUTURE_PLAN
The text was updated successfully, but these errors were encountered:
Ah, here's a smaller example:
$ R_FUTURE_PLAN=future.callr::callr Rscript --vanilla -e "loadNamespace('future')" Error: .onLoad failed in loadNamespace() for 'future', details: call: loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) error: cyclic namespace dependency detected when loading ‘future’, already loading ‘future.callr’, ‘future’ Execution halted
and
$ R_FUTURE_PLAN=future.callr::callr R --quiet --vanilla > loadNamespace("future") Error: .onLoad failed in loadNamespace() for 'future', details: call: loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) error: cyclic namespace dependency detected when loading ‘future’, already loading ‘future.callr’, ‘future’ > traceback() 3: stop(gettextf("%s failed in %s() for '%s', details:\n call: %s\n error: %s", hookname, "loadNamespace", pkgname, deparse(conditionCall(res))[1L], conditionMessage(res)), call. = FALSE, domain = NA) 2: runHook(".onLoad", env, package.lib, package) 1: loadNamespace("future")
To work around this, the future plan needs to be deferred to later (after the future package is loaded).
$ R_FUTURE_DEBUG=true R_FUTURE_PLAN=future.callr::callr Rscript --vanilla -e "loadNamespace('future')" ... [21:53:56.218] parallelly-specific environment variables: - R_FUTURE_DEBUG=‘true’ - R_FUTURE_PLAN=‘future.callr::callr’ [21:53:56.231] Future-specific environment variables: - R_FUTURE_DEBUG=‘true’ - R_FUTURE_PLAN=‘future.callr::callr’ ... [21:53:56.235] Environment variable ‘R_FUTURE_GLOBALS_KEEPWHERE’ not set [21:53:56.237] Option 'future.plan' = ‘future.callr::callr’ [21:53:56.237] R process uuid: cc462a76-6aa8-84ca-8578-752f3cab43ca [21:53:56.237] Setting plan('default') Error: .onLoad failed in loadNamespace() for 'future', details: call: loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) error: cyclic namespace dependency detected when loading ‘future’, already loading ‘future.callr’, ‘future’ Execution halted
Sorry, something went wrong.
No branches or pull requests
Issue
Action
Have
.onLoad()
detect whenR CMD build
is running and unsetR_FUTURE_PLAN
.The text was updated successfully, but these errors were encountered: