Rs.delta.chat's url

Hi all! I stumbled upon https://rs.delta.chat/ by accident. Is there a git/sparse url for a Crates registry instance? I would like to use the deltachat crate without referring to the git repository on GitHub.

EDIT: when adding the dependency as

deltachat = { git = "https://github.com/deltachat/deltachat-core-rust", version = "1.142.2" }

in Cargo.toml, the build of iroh-net (needed for deltachat) fails with

error[E0277]: `iroh_quinn::Accept<'_>` doesn't implement `derive_more::Debug`
   --> /home/foxy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iroh-net-0.21.0/src/endpoint.rs:908:10
    |
908 | #[derive(Debug)]
    |          ^^^^^ `iroh_quinn::Accept<'_>` cannot be formatted using `{:?}` because it doesn't implement `derive_more::Debug`
    |
    = help: the trait `derive_more::Debug` is not implemented for `iroh_quinn::Accept<'_>`, which is required by `&iroh_quinn::Accept<'_>: derive_more::Debug`
    = note: required for `&iroh_quinn::Accept<'_>` to implement `derive_more::Debug`
    = note: required for the cast from `&&iroh_quinn::Accept<'_>` to `&dyn derive_more::Debug`
    = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0277`.

I find this weird, because simply invoking cargo build in the Delta Chat core repo just works, of course.

we never really came around uploading to crates.io because we often needed to use patched git versions of dependencies, and to upload to crates.io every dependency needs to be available on crates.io.

About your error, maybe updating the rust version could help. besides that there are more knowledgeable core people than me who might be able to know the solution to your problem.

I am on the latest stable release apparently, so I don’t think that’s the problem. Has anyone ever managed to add deltachat as a dependency to another Rust project?

Yes, it worked before:

This is a bot that uses deltachat as a git dependency.

Given that the problem is due to iroh_quinn, you can as a workaround try to use earlier tag before 1.142.0 that used older versions of iroh without iroh_quinn.

@foxyseta Which version of Rust are you using? What is the output of rustc --version?

Thank you! I am on 1.80.0, and my version is up to date according to rustup. I am not sure why the problem disappears when I try to build deltachat by itself (and not as a dependency for some other crate).

I have the same problem at #298 - Update deltachat core to 1.142.2+ and update other dependencies - webxdc/xstore - Codeberg.org now, will look into it.

1 Like

I managed to fix this problem by downgrading derive_more:

cargo update -p derive_more@1.0.0-beta.7 --precise 1.0.0-beta.6

In deltachat core repo derive_more is pinned to 1.0.0-beta.6 by Cargo.lock, but when using it as a dependency in a new project only Cargo.toml matters. It is a regression in derive_more I guess, will try to update in deltachat-core-rust project and report upstream (EDIT: upstream report is at Regression in v1.0.0-beta.7 · Issue #392 · JelteF/derive_more · GitHub).

1 Like

Here is the core PR reproducing the problem:

1 Like

Nice job!