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

encoding warning confusion with test() #1776

Closed
plantarum opened this issue May 3, 2018 · 3 comments
Closed

encoding warning confusion with test() #1776

plantarum opened this issue May 3, 2018 · 3 comments
Labels
bug

Comments

@plantarum
Copy link
Contributor

@plantarum plantarum commented May 3, 2018

I'm not using encoding directives anywhere in my package, either in DESCRIPTION, .Rd files or vignettes. However, when I run my tests (via devtools::test), I get the warning:

Warning message:
encoding is deprecated; all files now assumed to be UTF-8

According to the R Extensions Manual, Encoding isn't actually deprecated, and even if it were I'm not using it. What is the intention of this warning? Have I done something that needs attention?

@jimhester
Copy link
Member

@jimhester jimhester commented May 4, 2018

This is actually referring to the encoding = parameter to testthat::test_dir(), rather than the Encoding: field in the DESCRIPTION file. We should remove the encoding argument at

encoding = pkg$encoding %||% "unknown"

@jimhester
Copy link
Member

@jimhester jimhester commented May 4, 2018

But as workaround you should be able to add Encoding: UTF-8 to your DESCRIPTION and that should make this warning go away.

@jimhester jimhester added the bug label May 4, 2018
@jimhester jimhester closed this in 99178f3 Jul 17, 2018
@lock
Copy link

@lock lock bot commented Jan 13, 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 Jan 13, 2019
HughParsonage added a commit to HughParsonage/devtools that referenced this issue Jul 2, 2019
Newer versions of testthat deprecate this argument, so we should no
longer use it in the call.

Fixes r-lib#1776
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants