-
Notifications
You must be signed in to change notification settings - Fork 241
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
bump combine version #84
Conversation
Thanks for this!
Yes, rbpf uses an old version. I haven't seen much interest in updating the dependencies so far, but if it raises security alerts, updates are welcome! I'm just a bit surprised, because Dependabot raises no alert on
Awesome, thanks! CI tests are all passing so it looks all good from my side.
I don't think we mind much the format for those, if it's already implemented in the crate I think we could just use that and avoid keeping another version in rbpf. Would you have a sample output for the two versions, by any chance?
Should not matter much either, but thanks a lot for raising this and let's see what they say.
👍 |
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.
Any chance we could have a bit more motivation and context in the commit log (mostly for the 2nd commit) please? I find it easier to check out git logs rather than GitHub PR discussions to understand where a change comes from.
Will do :) I will update the PR later tonight or tomorrow. |
The older version of combine uses the ascii crate. However, the latest version of combine version 4.6 no longer has this dependency. Since the major version changed from 2 -> 4, there are breaking changes. We address these breaking changes in this commit. Signed-off-by: yihuaf <yihuaf@unkies.org>
We no longer wish to format the error string ourselves, since the latest `combine` crate implements the display trait for the errors. Signed-off-by: yihuaf <yihuaf@unkies.org>
Take the
The
The output are very similar, so if you don't mind the actual format of the message, I would propose we just use the |
a3a7213
to
6c820a1
Compare
PTAL |
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 all good, thanks a lot!
The output are very similar, so if you don't mind the actual format of the message, I would propose we just use the to_string method instead. I added the change as a different commit for you to consider.
Definitely, let's get rid of this if combine
offers it already.
Not sure if you are willing to accept this PR, but nonetheless since I already did it. Currently, this crate uses
combine
crate version 2.5, which is a very old version. The latest version is4.6
.I understand that using an older version by itself is not an issue. I decided to go down this rabbit hole because I noticed the following security notification from dependabot on one of the project I am working on.
The older version of
combine
uses theascii
crate. However, the latest version ofcombine
version 4.6 no longer has this dependency.Since the major version changed from 2 -> 4, there are breaking changes, which I addressed in this PR. The latest version of
combine
implemented thedisplay
trait for the parser error, so technically we no longer need to format errors ourselves. However, the format is different, so I decided to keep the error format. I am happy to remove these functions if you wish.With that being said, I had to make changes to the
test_error_unexpected_character
error messages. The error will container the correctexpected end of input
, but also contain a number of other errors from previousmany
parser. I filed the issue: Marwes/combine#355 to clarify with thecombine
author. As far as I can tell, this is harmless behavior that doesn't impact the correctness of the parsing logic.There are two commits. The first are
cargo fmt
and the second contains the actual change.