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

Return dependencies in the reverse order #497

Merged
merged 2 commits into from
Jul 6, 2020
Merged

Conversation

jimhester
Copy link
Member

I am hopeful this will be a robust fix for the errors when installing mixed source and binary packages, e.g. #301

Other previous fixes worked around part of the problem, but really the underlying issue is that tools::package_dependencies(recursive = TRUE) just returns the unique dependencies in the order they are in the database. Because the dependencies in child nodes are always after their parents this means they are installed in the wrong order.

In the cases where install.packages() is installing only source packages or only binary packages there is no issue, as install.packages() handles the ordering internally for source packages, and the order you install binary packages doesn't matter.

I believe returning the dependencies in the reverse order should ensure that child dependencies always come before their parents, which is the root cause of this issue.

jimhester added 2 commits May 11, 2020 11:42

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@jimhester jimhester force-pushed the reverse-dep-order branch from e508edb to a974857 Compare May 11, 2020 15:43
@jimhester jimhester merged commit 1ee3a7a into master Jul 6, 2020
@jimhester jimhester deleted the reverse-dep-order branch July 6, 2020 20:05
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.

None yet

1 participant