-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Drop support for R 3.2 #4247
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
Comments
We have a commitment to support the last 4 versions of R. I think we should look into dropping digest |
Or alternatively help the digest package support 3.2? It seems a minor issue that caused them to bump the version: |
Thanks, but, though it doesn't seem to be very difficult to implement a new |
Thomas said "dropping digest" instead of "dropping support for R 3.2". Maybe we're all a bit confused. I just looked up the past R versions and I agree we should be fine with dropping 3.2:
|
Oh, true... Definitely, I'm a bit confused, sorry. |
Sorry. The confusion was my doing. We are not bound by our support commitment. Still, I think it would be beneficial to investigate whether dropping digest is viable from a performance point of view |
So
Created on 2020-10-25 by the reprex package (v0.3.0) One problem may be that the string can be of arbitrary length. One way around this would be to write a digestlight package that takes the string and runs it through a C++ hash function. That would be maybe 100 lines of code total, including everything needed to have a complete package. |
Some benchmarking to see how fast the various parts are.
Created on 2020-10-25 by the reprex package (v0.3.0) |
I didn't notice caching is this costly... Interesting. What about just using
Created on 2020-10-27 by the reprex package (v0.3.0) |
If I replace
What's worse, this isn't very fast. Here is the result on a realistic data on which I got the error above.
Created on 2020-11-02 by the reprex package (v0.3.0) |
This is weird. When I looked at the |
To answer my own question: No, it doesn't work, because C strings cannot contain binary zeros. |
Yeah. There might be nicer way to convert a binary into ASCII (e.g. BASE64 encoding), but I think Implementing a hashing algorithm doesn't seem trivial, and digest package is already very fast; it took only twice than bare serialization ( |
Can we agree to drop support for R 3.2? We might eventually implement another hashing package, but I don't think it will happen in the near future. So, I think it's better to make it clear that ggplot2 cannot be installed on R 3.2, at least at the moment. |
I think dropping support for 3.2 is fine for now. flange might eventually get a hashing function but I don't know the timeline for it |
Thanks. Is "flange" an R package that is not yet made public? Sounds interesting. |
In case someone is interested in this, xxhashlite serializes without |
As I commented on #4242 (comment), digest package now requires R >= 3.3.
digest::digest()
is used for hashing guides so that we can merge overlapped guides byguides_merge()
.ggplot2/R/guides-.r
Lines 231 to 244 in 7e51849
Since the hashing we need is very simple, it's probably possible to implement another hashing function (Maybe
paste()
with some nice separator is enough...?), but I'm not sure if it's worth. I feel it's time to consider dropping support for R 3.2. If this sounds good, I'll prepare a pull request.The text was updated successfully, but these errors were encountered: