aembke / redis-protocol.rs

A Rust implementation of RESP2 and RESP3
Apache License 2.0
39 stars 13 forks source link

Update the nom version #23

Closed gautam314e closed 2 years ago

gautam314e commented 2 years ago

Hi we are using nom = "6.1" which internally uses old version of bitvec (bitvec=0.19). bitvec has some breaking changes and now has a stable bitvec=1.0.0. bitvec is also used across many projects and it is creating conflicts with libraries using latest bitvec.

error[E0034]: multiple applicable items in scope
   --> /home/user1/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.19.4/src/order.rs:315:15
    |
315 |         if ct == R::BITS {
    |                     ^^^^ multiple `BITS` found
    |
note: candidate #1 is defined in the trait `IsNumber`
   --> /home/user1/.cargo/registry/src/github.com-1ecc6299db9ec823/funty-1.2.0/src/lib.rs:144:2
    |
144 |     const BITS: u32;
    |     ^^^^^^^^^^^^^^^^
note: candidate #2 is defined in the trait `BitMemory`
   --> /home/user1/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.19.4/src/mem.rs:29:2
    |
29  |     const BITS: u8 = mem::size_of::<Self>() as u8 * 8;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: disambiguate the associated constant for candidate #1
    |
315 |         if ct == <R as IsNumber>::BITS {
    |                  ~~~~~~~~~~~~~~~~~
help: disambiguate the associated constant for candidate #2
    |
315 |         if ct == <R as BitMemory>::BITS {
    |                  ~~~~~~~~~~~~~~~~~~

Please check the compatibility with nom=7.1

mercxry commented 2 years ago

I have the same exact problem and reached the same conclusions, an update of the nom library to 7.1.1 should fix this 🙂

aembke commented 2 years ago

Yeah, thanks for the feedback on this. I'm planning on fixing all of the open issues this weekend, so hopefully I'll have something soon here. My hands are pretty full with dependabot upgrades after github added real dependency tree scanning this week, so there'll likely be a lot of version upgrades coming soon.

aembke commented 2 years ago

Ok this is updated in 4.1.0 on crates.io. I'm about to push the other issues/PRs as a different version, but if you're only interested in the updated deps I'd recommend using 4.1.0