Skip to content

refactor: Remove async_trait in Catalog trait. #139

Closed as not planned
Closed as not planned

Description

@liurenjie1024

After #140 get merged, we will be able to use async fn in trait, and async_trait macro is no longer needed.

Activity

  1. hiirrxnn commented on Jan 22, 2024

    @hiirrxnn
    Contributor

    Could I work on this ? Please tell me what precisely is to be done here?

  2. liurenjie1024 commented on Jan 23, 2024

    @liurenjie1024
    ContributorAuthor

    Could I work on this ? Please tell me what precisely is to be done here?

    The release of rust 1.75 enables a fancy feature so that we no longer need to use async_trait macro, you can read this blog for reference.

    You can also see the FileWriter trait in this pr as an example.

  3. jdockerty commented on Jun 1, 2024

    @jdockerty
    Contributor

    Is there any movement on this one? I see there was a prior PR to close, but it was closed pending upstream releases.

    If there's nobody working on it anymore, I would like to take a shot at it if that's okay 👍

    For mine/anyone else's reference, is there a preference to using impl Future<Output = ...> or maintaining the async fn signatures with trait_variant crate?

  4. liurenjie1024 commented on Jun 2, 2024

    @liurenjie1024
    ContributorAuthor

    Is there any movement on this one? I see there was a prior PR to close, but it was closed pending upstream releases.

    If there's nobody working on it anymore, I would like to take a shot at it if that's okay 👍

    For mine/anyone else's reference, is there a preference to using impl Future<Output = ...> or maintaining the async fn signatures with trait_variant crate?

    Hi, @jdockerty Thanks for you interest, I think we can go on this work after rust-lang/impl-trait-utils#27 is release on new rust release.

  5. Xuanwo commented on Jun 10, 2024

    @Xuanwo
    Member

    I personally do not favor adopting async in trait for the Catalog API because it compromises object safety. Users will no longer be able to use Box<dyn Catalog>. All APIs related to Catalog should include generic parameters.

  6. Xuanwo commented on Jul 5, 2024

    @Xuanwo
    Member

    I propose closing this issue as it's unlikely we'll remove async_trait from Catalog until easier methods for implementing object-safe trait objects are available. Additionally, catalog API calls are usually not on the critical path in most of our use cases. Adding such a maintenance burden isn't worth it.

    cc @liurenjie1024 @jdockerty

  7. liurenjie1024 commented on Jul 6, 2024

    @liurenjie1024
    ContributorAuthor

    +1, we can close this first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions