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

Do not handle warnings when options("warn") >= 2 #721

merged 4 commits into from Mar 30, 2018


None yet
2 participants
Copy link

yutannihilation commented Feb 24, 2018

When options("warn") >= 2, a warning is converted into an error. So, in that case, we should not handle it by the warning handler, but do nothing and let it handled by the error handler.

This usually won't be a problem, except when a package has some tricky tests that change the value of options("warn"), but actually evaluate package suffers from this: r-lib/evaluate#81 (comment)

I believe this PR will fix the problem, but I'm not fully sure there's no downside... Should this be treated as a known issue?

@yutannihilation yutannihilation force-pushed the yutannihilation:option-warn-lt-2 branch from e132771 to aa1e81d Feb 24, 2018

@yutannihilation yutannihilation changed the title [WIP] Do not handle warnings when options("warn") >= 2 Do not handle warnings when options("warn") >= 2 Feb 24, 2018

jimhester added some commits Mar 30, 2018

@jimhester jimhester merged commit 5ed0bb1 into r-lib:master Mar 30, 2018

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress

This comment has been minimized.

Copy link

jimhester commented Mar 30, 2018

Thanks! I think passing the warning on in this case makes sense, it also allows you set options(warn = 2) in your tests if you want warnings to fail the build ala #731,

@yutannihilation yutannihilation deleted the yutannihilation:option-warn-lt-2 branch Mar 30, 2018


This comment has been minimized.

Copy link
Contributor Author

yutannihilation commented Mar 30, 2018

Oh, I didn't come up with the usage. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.