serverlesstechnology / cqrs

A lightweight, opinionated CQRS and event sourcing framework.
Other
382 stars 40 forks source link

`0.4.10` Fails to compile on `1.75` #89

Closed appetrosyan closed 9 months ago

appetrosyan commented 9 months ago

Rust now has native support for async fn in traits and implementations.

For the time being, any attempt to compile with a cleaned up Cargo.lock results in the following:

method `handle` should be async because the method from the trait is async

Minimum working example:

  1. cargo new cqrs-es-test
  2. In cqrs-es-test run cargo add cqrs-es
  3. Finally, run cargo check.

Proposed solution

Remove dependency on async_trait. It handles more edge cases than the current rustc solution, but those edge cases are likely to be resolved upstream.

appetrosyan commented 9 months ago

OK, so after some digging, I think I know what the problem is.

The offending module is doc.rs where the implementation is made using the async_trait but the trait defnition doesn't have it.

davegarred commented 9 months ago

I'm unable to replicate the bug (Debian/amd64), what hardware are you finding this on?

appetrosyan commented 9 months ago

Ryzen 2700x.

appetrosyan commented 9 months ago

Just pulled and replaced the dependency with the specific path. And the problem went away.

This may be something with the cargo registry.

appetrosyan commented 9 months ago

/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cqrs-es-0.4.10/src/doc.rs:42:5 OK so this is the offending file.

The latest commit in 0.4.10 is c2f7, maybe that's the clue

davegarred commented 9 months ago

Can't reproduce.