-
Notifications
You must be signed in to change notification settings - Fork 991
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
Comparison operators will not work with language objects in R-devel #5977
Comments
What are the other values a accepted in _R_COMPARE_LANG_OBJECTS ? |
Did the e-mail mention what the long-term state will be for comparison of language objects? I see ordered comparisons will be blocked, but are |
I used the GitHub Code space on
|
Nice, actually this caught a bad test in our suite :) PR incoming |
Seems they're enumerated here. I don't know the corresponding behaviors. |
All of I am not sure yet what the intended migration path is -- using We'll probably have to deprecate |
I think we should include #5986 as part of the next patch release. |
Agreed. The test is an easy fix but curious for the others. Not entirely sure why this would be an important change for R-devel unless they have a good workaround (e.g., |
Got a message today from Luke Tierney about this change in R-devel.
Comparison operators == and != can be used on language objects
(i.e. call objects and symbols). The == operator in particular often
seems to be used as a shorthand for calling identical(). The current
implementation involves comparing deparsed calls as strings. This has
a number of drawbacks and we would like to transition to a more robust
and efficient implementation. As a first step, R-devel will soon be
modified to signal an error when the ordered comparison operators <,
<=, >, >= are used on language objects. A small number of CRAN and
BIOC packages will fail after this change. If you want to check your
packages or code before the change is committed you can run the
current R-devel with the environment variable setting
_R_COMPARE_LANG_OBJECTS=eqonly
where using such a comparison now produces
I haven't done a thorough review of where/if this occurs yet. Plant to do that this weekend unless someone beats me to it.
The text was updated successfully, but these errors were encountered: