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

Wrong warning text for str_view_all() deprecation #518

Closed
mine-cetinkaya-rundel opened this issue Jul 23, 2023 · 2 comments
Closed

Wrong warning text for str_view_all() deprecation #518

mine-cetinkaya-rundel opened this issue Jul 23, 2023 · 2 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@mine-cetinkaya-rundel
Copy link
Member

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()).

@hadley hadley added the bug an unexpected problem or unintended behavior label Aug 4, 2023
@hadley
Copy link
Member

hadley commented Aug 4, 2023

Oops

@hadley
Copy link
Member

hadley commented Nov 14, 2023

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

@hadley hadley closed this as completed Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants