-
Notifications
You must be signed in to change notification settings - Fork 129
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
Support non-utf8 data in collapse by doing lossy conversion #196
Conversation
This seems like a very reasonable thing to include to me! |
Awesome! I've made the change to the other options. I did remove the handling inside of the There should be no additional allocations, except in the case of non-utf8 data, and although benchmarks on my system were pretty imprecise, none showed regressions. I also updated the test case which specifically fails on invalid utf8, was this intentional before? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I don't have a good answer for why we explicitly tested against the error for the non-UTF8 case. That just seems wrong!
It looks like your change no longer compiles on Rust 1.40.0, though I'm not sure. And looks like the build logs have since disappeared (sorry it too me so long to get back to this). Could you either try running it locally ( |
Ah it does fail locally, but it does also on |
Ah, looks like one of our dependencies bumped their MSRV. I'll look into it, thanks! |
A project I'm benchmarking has non-utf8 data in the dtrace, and it's quite annoying to have to use iconv to sanitize the file before collapsing. I did this for my own needs, and figured I would PR as it might be useful to others as well.
If you are open to this, I should also add this to other parts of the code that do similar things, but I won't do that preemptively unless go ahead is given (not sure if there is a good reason this is not done)