Mock library
inside modules / Load module in specific environment
#381
Unanswered
king-of-poppk
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I see how the underlying implementation of
box::use
relies on callingbox::use_one
withparent.frame()
andsys.call()
. I am trying to mocklibrary
andrequire
calls inside box-loaded modules in order to make them "work". However, all I've been able to do so far was to makelibrary
load all exported names available (modulo certain special exports, likeggplot2::mpg
) in the caller module scope (similar to howbox::use
) works.What's the proper way to leverage
box::use_one
to load modules in some specific module scope? All my attempts so far either resulted in C stack overflows (infinite recursion?) or modules being loaded in the wrong scope.Beta Was this translation helpful? Give feedback.
All reactions