tidyverse / stringr

A fresh approach to string manipulation in R

Home Page:https://stringr.tidyverse.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong warning text for `str_view_all()` deprecation

mine-cetinkaya-rundel opened this issue · comments

See reprex below:

library(stringr)
str_view_all(sentences[1:10], "[aeiou]")
#> Warning: `str_view()` was deprecated in stringr 1.5.0.
#> ℹ Please use `str_view_all()` instead.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.
#>  [1] │ Th<e> b<i>rch c<a>n<o><e> sl<i>d <o>n th<e> sm<o><o>th pl<a>nks.
#>  [2] │ Gl<u><e> th<e> sh<e><e>t t<o> th<e> d<a>rk bl<u><e> b<a>ckgr<o><u>nd.
#>  [3] │ It's <e><a>sy t<o> t<e>ll th<e> d<e>pth <o>f <a> w<e>ll.
#>  [4] │ Th<e>s<e> d<a>ys <a> ch<i>ck<e>n l<e>g <i>s <a> r<a>r<e> d<i>sh.
#>  [5] │ R<i>c<e> <i>s <o>ft<e>n s<e>rv<e>d <i>n r<o><u>nd b<o>wls.
#>  [6] │ Th<e> j<u><i>c<e> <o>f l<e>m<o>ns m<a>k<e>s f<i>n<e> p<u>nch.
#>  [7] │ Th<e> b<o>x w<a>s thr<o>wn b<e>s<i>d<e> th<e> p<a>rk<e>d tr<u>ck.
#>  [8] │ Th<e> h<o>gs w<e>r<e> f<e>d ch<o>pp<e>d c<o>rn <a>nd g<a>rb<a>g<e>.
#>  [9] │ F<o><u>r h<o><u>rs <o>f st<e><a>dy w<o>rk f<a>c<e>d <u>s.
#> [10] │ A l<a>rg<e> s<i>z<e> <i>n st<o>ck<i>ngs <i>s h<a>rd t<o> s<e>ll.

Created on 2023-07-23 with reprex v2.0.2

Per https://www.tidyverse.org/blog/2022/12/stringr-1-5-0/#str_view, I think this warning should instead read:

#> Warning: `str_view_all()` was deprecated in stringr 1.5.0.
#> ℹ Please use `str_view()` instead.

The current warning claims str_view() is deprecated, which doesn't match the blog post or what's happening in the code (I didn't call str_view()).

Looks like this was fixed in #490. I'll do a patch release to get this and some other doc improvements into the wild.