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

Make stringr / stringi a soft dependency #1549

Open
HughParsonage opened this issue May 24, 2018 · 1 comment
Open

Make stringr / stringi a soft dependency #1549

HughParsonage opened this issue May 24, 2018 · 1 comment

Comments

@HughParsonage
Copy link

@HughParsonage HughParsonage commented May 24, 2018

knitr's dependency graph includes evaluate and stringr, and thus stringi. Package stringi is a heavy dependency: it takes around a minute to install from source (or several on OSX or Windows) -- a typical use-case for things like Travis-CI. Since knitr (to its immense credit) is required for testing by an enormous number of packages, shaving a minute from each test could have a large payoff. (I also use Travis-CI to deploy knitr+LaTeX documents and installing stringi is a significant component of the build time.)

I'd propose to move stringr to Suggests both here and in evaluate. I'd keep the same verbs as stringr uses, but switch to base R if stringi is not installed. See https://github.com/HughParsonage/TeXCheckR/blob/master/R/suggested_speedups.R for an example of softening the dependencies for readr and stringi.

A glance at the parts of the source currently importing stringr makes me think this would not be too hard. I'd be happy to do the work, but your contribution guidelines say to raise an issue before starting work on something like this.

@yihui

This comment has been minimized.

Copy link
Owner

@yihui yihui commented May 24, 2018

Thanks for asking first! I'd love to get rid of the stringr/stringi dependencies if possible. Installing stringi also bothers myself a bit. Please feel free to work on it and I'll be happy to review the PR. Thanks!

HughParsonage added a commit to HughParsonage/evaluate that referenced this issue May 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.