search for: upstream_function

Displaying 1 result from an estimated 1 matches for "upstream_function".

2022 Jan 21
1
isNamespaceLoaded() while the namespace is loading
We ran into a bug in our package that seems to boil down to isNamespaceLoaded() returning TRUE for namespaces that R is currently loading. We had something like this in an .onLoad function: if (isNamespaceLoaded("upstream")) { upstream::upstream_function() } Which seems OK, unless upstream (recursively) imports the package having this code. Should that happen, the loading of upstream triggers the loading of this package as well and isNamespaceLoaded() seems to return TRUE, even though the namespace of upstream is not fully loaded yet, and we get a...