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

Remove stringr dependency #2530

Merged
merged 5 commits into from
Dec 5, 2023
Merged

Remove stringr dependency #2530

merged 5 commits into from
Dec 5, 2023

Conversation

etiennebacher
Copy link
Contributor

@etiennebacher etiennebacher commented Dec 5, 2023

The aim of this PR is to remove the stringr dependency. stringr is only used once in the package but adds 4 (sometimes heavy) dependencies: stringi, vctrs, magrittr, and stringr itself.

pak::pkg_deps("rmarkdown", dependencies = "hard") |> 
    dplyr::pull(ref) |> 
    unique() |> 
    length()
#> 31

After this PR:

pak::local_deps(".", dependencies = "hard") |> 
    dplyr::pull(ref) |> 
    unique() |> 
    length()
#> 27

I didn't test on external packages, I only relied on the test suite here.

Copy link
Member

@yihui yihui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thanks!

R/base64.R Outdated Show resolved Hide resolved
@yihui yihui self-assigned this Dec 5, 2023
@yihui yihui merged commit 72cd623 into rstudio:main Dec 5, 2023
16 checks passed
@etiennebacher etiennebacher deleted the remove-stringr branch December 5, 2023 17:06
jonathan-g added a commit to jonathan-g/rmarkdown that referenced this pull request Dec 19, 2023
Merge remote-tracking branch 'rstudio/main' into jg-tree-fix

* rstudio/main:
  Use new version of `has_crop_tools()` from knitr (rstudio#2532)
  some cosmetic changes
  use ignore.case = TRUE for regex functions instead of enumerating upper/lowercase letters
  Remove `stringr` dependency (rstudio#2530)
  Add a mention about required configuration when erroring about webshot and webshot2

# Conflicts:
#	NEWS.md
jonathan-g added a commit to jonathan-g/rmarkdown that referenced this pull request Dec 19, 2023
Merge remote-tracking branch 'rstudio/main' into jg-devel

* rstudio/main:
  Use new version of `has_crop_tools()` from knitr (rstudio#2532)
  some cosmetic changes
  use ignore.case = TRUE for regex functions instead of enumerating upper/lowercase letters
  Remove `stringr` dependency (rstudio#2530)
  Add a mention about required configuration when erroring about webshot and webshot2

# Conflicts:
#	NEWS.md
jonathan-g added a commit to jonathan-g/rmarkdown that referenced this pull request Dec 19, 2023
Merge branch 'jg-devel'

* jg-devel:
  Use new version of `has_crop_tools()` from knitr (rstudio#2532)
  some cosmetic changes
  use ignore.case = TRUE for regex functions instead of enumerating upper/lowercase letters
  Remove `stringr` dependency (rstudio#2530)
  Add a mention about required configuration when erroring about webshot and webshot2
  Fixed documentation problems with `publish_site()`

# Conflicts:
#	R/publish_site.R
ddsjoberg pushed a commit to ddsjoberg/starter that referenced this pull request Mar 5, 2024
Previously this soft dependency doesn't need to be explicitly declared because **rmarkdown** has been suggested, which requires **stringr** (which in turn requires **stringi**). Now the dependency is no longer guaranteed in **rmarkdown** (rstudio/rmarkdown#2530), so **starter** has to explicitly declare the dependency, otherwise it will fail `R CMD check`.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants