You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there is already a relevant issue, whether open or closed, comment on the existing thread instead of posting a new issue.
New features take time and effort to create, and they take even more effort to maintain. So if the purpose of the feature is to resolve a struggle you are encountering personally, please consider first posting a "trouble" or "other" issue so we can discuss your use case and search for existing solutions first.
#132, #235, ropensci/drake#1286. Tracking functions from packages has been an issue for years, and it's tricky because packages have their own environments. Until now, the choices have been:
Ignore package functions.
Track only the functions inside a single package, ignoring the global environment.
Manually assign package functions into the global environment.
(1) is severely limiting, (2) is still limiting, and (3) is a brittle hack that breaks environments and closures.
Proposal
Distinguish between the environment that runs targets and the environment to inspect for global dependencies. targets could manually create the latter while leaving the former completely untouched. By default, they could be the same. But if the user assigns tar_option_set(imports = c("analysisPackage1", "analysisPackage2")), targets could create a new environment, copy in everything from getNamespace("analysisPackage2"), do the same for getNamespace("analysisPackage1"), and then again for tar_option_get("envir"). Simple to implement and best of all worlds!
The text was updated successfully, but these errors were encountered:
Prework
Motivation
#132, #235, ropensci/drake#1286. Tracking functions from packages has been an issue for years, and it's tricky because packages have their own environments. Until now, the choices have been:
(1) is severely limiting, (2) is still limiting, and (3) is a brittle hack that breaks environments and closures.
Proposal
Distinguish between the environment that runs targets and the environment to inspect for global dependencies.
targets
could manually create the latter while leaving the former completely untouched. By default, they could be the same. But if the user assignstar_option_set(imports = c("analysisPackage1", "analysisPackage2"))
,targets
could create a new environment, copy in everything fromgetNamespace("analysisPackage2")
, do the same forgetNamespace("analysisPackage1")
, and then again fortar_option_get("envir")
. Simple to implement and best of all worlds!The text was updated successfully, but these errors were encountered: