Especially the errors related to traits are very difficult to me. Will I get used to it? Or am I just a failure? :D

Like WTH is this?

the trait bound '(diesel::sql_types::Uuid, diesel::sql_types::Text, diesel::sql_types::Nullable, diesel::sql_types::Timestamp, diesel::sql_types::Timestamp): diesel::query_dsl::CompatibleType' is not satisfied the following other types implement trait 'diesel::query_dsl::CompatibleType': (ST0,) (ST0, ST1) (ST0, ST1, ST2) (ST0, ST1, ST2, ST3) (ST0, ST1, ST2, ST3, ST4) (ST0, ST1, ST2, ST3, ST4, ST5) (ST0, ST1, ST2, ST3, ST4, ST5, ST6) (ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7) and 24 others required for 'SelectStatement, DefaultSelectClause>, NoDistinctClause, ..., ..., ...>' to implement 'diesel_async::methods::LoadQuery<'_, _, models::Artist>

Or this:

the variant or associated item 'as_select' exists for enum 'Option<Image>', but its trait bounds were not satisfied the following trait bounds were not satisfied: 'std::option::Option<models::Image>: diesel::Selectable<_>' which is required by 'std::option::Option<models::Image>: diesel::SelectableHelper<_>' '&std::option::Option<models::Image>: diesel::Selectable<_>' which is required by '&std::option::Option<models::Image>: diesel::SelectableHelper<_>' '&mut std::option::Option<models::Image>: diesel::Selectable<_>' which is required by '&mut std::option::Option<models::Image>: diesel::SelectableHelper<_>'

  • BB_C@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    11 months ago
    • I take slight issue with your title. Such diesel errors are not your average Rust error.
    • Looking at the first example, you should have quickly realized that lack of kind abstractions over types (lol no HKTs) since Rust v1.0 is contributing to the verbosity. Maybe in a few years, with features like GATs maturing, expanding in scope, and being used more in the ecosystem, things will get better!
    • iso@lemy.lolOP
      link
      fedilink
      arrow-up
      0
      ·
      11 months ago

      I usually get errors close in size to this but at the moment I had a diesel to send. I kind of figuring out the problems but it takes time and a few hairs :)