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

Can I remove BH after installing dplyr? #4148

Closed
cfry-propeller opened this issue Feb 1, 2019 · 5 comments
Closed

Can I remove BH after installing dplyr? #4148

cfry-propeller opened this issue Feb 1, 2019 · 5 comments

Comments

@cfry-propeller
Copy link

I know there are several related threads of conversation here and elsewhere concerning the dependency of dplyr on BH (e.g. here, here, and here). I also posted about this on Rstudio Community and Stack Overflow, but I haven't really made any headway on a concrete answer.

I know that Writing R Extensions is pretty explicit about the purpose of LinkingTo, but its material is a little over my head so I'll have to beg your patience, because I know my confusion is mostly a result of my limited understanding.

I'm working on a use case that is space-sensitive, specifically running a data pipeline in R on an AWS Lambda. An AWS Lambda function is restricted to 250MB. Because of that, we remove the BH package after dplyr has been installed - it's simply too large to use in an AWS Lambda function. This hasn't created any problems for us, but I'm trying to better understand whether we just happen to not be using any functions of dplyr that depend on BH or if it's perhaps because the dplyr dependency on BH is only a compile-time dependency.

I am unclear on the specific meaning and implication of a LinkingTo dependency vs, for example, a Depends or Imports. The explanations of LinkingTo dependencies that I've found (including that in Writing R Extensions) have sometimes given me the sense that LinkingTo dependencies are necessary for installation of the package, after which any dependent code has been wrapped in the installed package through static linking so that there is no runtime dependency. Other times it seems more ambiguous and that there can still be runtime dependencies with a LinkingTo dependency.

My general question is: can LinkingTo dependencies be removed after the package that depends on them has been installed without runtime consequences as long as the dependency isn't also listed as Depends, Imports, etc.?

My specific question is: is it safe to remove BH after installation of dplyr is complete or will it break certain functions? If it would break certain functions, will they break "loudly" such that we would know that an error has occurred and can simply choose alternative approaches to accomplishing the goal?

As I mentioned, we've already removed BH and haven't seen any negative impacts, but this is just the first generation of this pipeline and I'd like to know what we're walking into as we expand its capabilities. Any advice on this would be much appreciated!

@romainfrancois
Copy link
Member

We'll eventually remove the BH dependency. In the meantime, yes, BH is only used for header files, so it should be safe to remove it.

@JoFAM
Copy link

JoFAM commented Feb 3, 2019

@romainfrancois it would be great if BH could be removed. Due to recent updates in a few tidyverse packages, I ran into a lot of trouble during an exam because some students tried to reinstall tidyverse. First it tried to install from source, then it blocked at installing BH.

I know this is not to be blamed on tidyverse but on my students. Still, it's almost impossible to get BH downloaded over the internet connection at our PC rooms when 35 students do that simultaneously. They lost about an hour of the exam before I could fix it on all computers. So removing the BH dependency would be an absolutely great thing for us.

@romainfrancois
Copy link
Member

I know. That’s similar to why we want to let it go. dplyr only uses two things :

  • hash maps and hash sets, i’m hoping that vctrs integration in 0.9.* will take care of that.
  • shared pointers but we can probably code around that need.

@cfry-propeller
Copy link
Author

Thank you, @romainfrancois! Really appreciate the help.

@lock
Copy link

lock bot commented Aug 6, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants