-
Notifications
You must be signed in to change notification settings - Fork 91
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
avoid repeated package dependency processing #615
Conversation
This PR looks good to me, although I think we might need to narrow the scope a bit more since (if I understand the test failures correctly) some APIs do rely on us building the full dependency tree for packages. What if we instead hid this behavior behind an option, e.g. something like |
Updated the approach to prune the search while still producing the full dependency tree. |
R/pkg.R
Outdated
priorPkgRecords <- c() | ||
for (pkgName in pkgNames) { | ||
if (exists(pkgName, envir = .visited.packages)) { | ||
append(priorPkgRecords, get(pkgName, envir = .visited.packages)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
append(priorPkgRecords, get(pkgName, envir = .visited.packages)) | |
priorPkgRecords <- append(priorPkgRecords, get(pkgName, envir = .visited.packages)) |
As is, this statement won't update priorPkgRecords
-- is that intentional?
LGTM! (Remaining test failures are due to dependent R packages not being available for older R.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM -- thanks for putting this together! (And thanks to @andrie for getting this work started as well.)
an alternate tree-pruning approach from #614; part of an ongoing discussion with @andrie