Skip to content
New issue

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

Optional feature: cleanly track functions/objects from multiple external packages #241

Merged
merged 14 commits into from
Dec 2, 2020

Conversation

wlandau
Copy link
Member

@wlandau wlandau commented Dec 2, 2020

Prework

Related GitHub issues and pull requests

Summary

By default, targets ignores changes to functions inside external packages. However, if a workflow centers on a custom package with methodology under development, users can make targets automatically watch the package's functions for changes. Simply supply the names of the relevant packages to the imports argument of tar_option_set(). Unlike drake, targets can track multiple packages this way, and the internal mechanism is much safer.

If you supply multiple packages, e.g. tar_option_set(imports = c("p1", "p2")), then the objects in p1 override the objects in p2 if there are name conflicts. Similarly, objects in tar_option_get("envir") override everything in tar_option_get("imports").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants