NLnetLabs / domain

A DNS library for Rust.
https://nlnetlabs.nl/projects/domain/about/
BSD 3-Clause "New" or "Revised" License
328 stars 56 forks source link

Latest version of domain 0.10.0 is not compatible with triomphe v0.1.12 #322

Closed ravalikakurumillla closed 1 week ago

ravalikakurumillla commented 1 month ago

Tried using the latest domain crate domain = "0.10.0"

[[package]]
name = "domain"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5cd50aea158e9a57c9c9075ca7a3dfa4c08d9a468b405832383876f9df85379b"
dependencies = [
 "bytes",
 "futures-util",
 "moka",
 "octseq",
 "pin-project-lite",
 "rand 0.8.5",
 "smallvec",
 "time",
 "tokio",
 "tracing",
]
[[package]]
name = "moka"
version = "0.12.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e0d88686dc561d743b40de8269b26eaf0dc58781bde087b0984646602021d08"
dependencies = [
 "async-lock 3.3.0",
 "async-trait",
 "crossbeam-channel",
 "crossbeam-epoch",
 "crossbeam-utils",
 "event-listener 5.3.1",
 "futures-util",
 "once_cell",
 "parking_lot",
 "quanta",
 "rustc_version",
 "smallvec",
 "tagptr",
 "thiserror",
 "triomphe",
 "uuid",
]
[[package]]
name = "triomphe"
version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b2cb4fbb9995eeb36ac86fadf24031ccd58f99d6b4b2d7b911db70bddb80d90"

Failing with the below error

error[E0425]: cannot find function `addr_eq` in module `ptr`
   --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/triomphe-0.1.12/src/arc.rs:282:14
    |
282 |         ptr::addr_eq(this.ptr(), other.ptr())
    |              ^^^^^^^ not found in `ptr`

   Compiling tagptr v0.2.0
   Compiling httpdate v1.0.3
   Compiling clang-sys v1.8.2
   Compiling aho-corasick v1.1.3
error[E0658]: use of unstable library feature 'pointer_byte_offsets'
   --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/triomphe-0.1.12/src/arc.rs:201:33
    |
201 |         let arc_inner_ptr = ptr.byte_sub(offset_of_data);
    |                                 ^^^^^^^^
    |
    = note: see issue #96283 <https://github.com/rust-lang/rust/issues/96283> for more information

   Compiling anstream v0.6.14
   Compiling nom v7.1.3
tertsdiepraam commented 1 month ago

This is due to triomphe bumping their MSRV to 1.76. Downgrading triomphe works or updating you rust version. This was completely out of our hands, but we bumped our MSRV accordingly, which will be in the next release.

ravalikakurumillla commented 1 month ago

Thank you for the confirmation @tertsdiepraam. Do you have any ETA for the next release?

tertsdiepraam commented 1 month ago

I'll defer to @partim, but I believe we'll have a 0.10.1 very soon.

vavrusa commented 1 month ago

It would be nice not bumping domain MSRV to the latest rust version if only 1.76 is actually required.

partim commented 1 month ago

We figured we go to 1.78 since Alpine already has that – which currently is our yardstick – and this might avoid having to do another bump soon.

Do you have a reason to only do 1.76?

vavrusa commented 1 month ago

You can use 1.78 in tests, just set the MSRV to 1.76. MSRV is meant to be the minimum supported version that the crate builds with. We almost never use the latest rust compiler version as there's sometimes bugs. It's not a huge deal, I can fork and patch every release we use but I don't understand the reasoning here.

partim commented 1 month ago

Earlier we (well, I, really) considered every MSRV change a breaking change. But since this is just not possible (certainly not when we go 1.0), the policy to try to not change it too often isn’t really necessary any more.

We’re currently discussing a new strategy that will provide a decent compromise between people who need to use older compiler versions and those that always are on latest stable.

Either way, apologies if we broke things for you!

partim commented 1 week ago

0.10.1 has been released and we also updated our MSRV policy. So I guess we can close the issue.