Coder Social home page Coder Social logo

Comments (8)

Nakuromi avatar Nakuromi commented on August 17, 2024 1

Hi,

Sorry, I was in hospital yesterday but I'm could try it this afternoon and it's working !
Thanks very much 😊

I have to read more about cargo feature patch with git because I don't understand why it have to do have to add git submodul patch in this case though the git source is already added and no branch, rev or other specification is needed ^^

Thank's of merging the fix, all are working well :)

from twitch_api.

Nerixyz avatar Nerixyz commented on August 17, 2024

I have read #401 and #404 issus but no solution for this error seem not to be fix my building error.

Can you try #404 as a git dependency?

[dependencies]
twitch_api = { git = "https://github.com/twitch-rs/twitch_api.git", branch = "deps/reqwest-http-and-stuff", features = ["..."] }

Seems like a duplicate of #401.

from twitch_api.

Nakuromi avatar Nakuromi commented on August 17, 2024

Can you try #404 as a git dependency?

Yes, I forgot to to mention that i have try #404 solution. So tireding day, sorry.

And that make another error in src/helix/client/client_ext.rs

error[E0277]: the trait bound `&twitch_types::basic::UserIdRef: IntoCow<'_, UserIdRef>` is not satisfied
   --> .cargo\git\checkouts\twitch_api-e5fea103d3f2733c\dd1fae3\src\helix\client\client_ext.rs:333:70
    |
333 |         let req = helix::streams::GetFollowedStreamsRequest::user_id(user_id);
    |                   -------------------------------------------------- ^^^^^^^ the trait `IntoCow<'_, UserIdRef>` is not implemented for `&twitch_types::basic::UserIdRef`
    |                   |
    |                   required by a bound introduced by this call
    |
    = help: the following other types implement trait `IntoCow<'a, Ref>`:
              <UserId as IntoCow<'a, UserIdRef>>
              <DisplayName as IntoCow<'a, DisplayNameRef>>
              <std::borrow::Cow<'a, S> as IntoCow<'a, R>>
              <Nickname as IntoCow<'a, NicknameRef>>
              <MsgId as IntoCow<'a, MsgIdRef>>
              <HexColor as IntoCow<'a, HexColorRef>>
              <BadgeSetId as IntoCow<'a, BadgeSetIdRef>>
              <ChatBadgeId as IntoCow<'a, ChatBadgeIdRef>>
            and 89 others
rustc[E0277](rust-analyzer-diagnostics-view:/diagnostic%20message%20%5B0%5D?0#file%3A.cargo%2Fgit%2Fcheckouts%2Ftwitch_api-e5fea103d3f2733c%2Fdd1fae3%2Fsrc%2Fhelix%2Fclient%2Fclient_ext.rs)
client_ext.rs(333, 19): required by a bound introduced by this call
get_followed_streams.rs(71, 34): required by a bound in `GetFollowedStreamsRequest::<'a>::user_id`

and

error[E0277]: the trait bound `&twitch_types::basic::UserIdRef: IntoCow<'_, UserIdRef>` is not satisfied
   --> .cargo\git\checkouts\twitch_api-e5fea103d3f2733c\dd1fae3\src\helix\client\client_ext.rs:377:92
    |
377 |         let req = helix::subscriptions::GetBroadcasterSubscriptionsRequest::broadcaster_id(user_id);
    |                   ------------------------------------------------------------------------ ^^^^^^^ the trait `IntoCow<'_, UserIdRef>` is not implemented for `&twitch_types::basic::UserIdRef`
    |                   |
    |                   required by a bound introduced by this call
    |
    = help: the following other types implement trait `IntoCow<'a, Ref>`:
              <UserId as IntoCow<'a, UserIdRef>>
              <DisplayName as IntoCow<'a, DisplayNameRef>>
              <std::borrow::Cow<'a, S> as IntoCow<'a, R>>
              <Nickname as IntoCow<'a, NicknameRef>>
              <MsgId as IntoCow<'a, MsgIdRef>>
              <HexColor as IntoCow<'a, HexColorRef>>
              <BadgeSetId as IntoCow<'a, BadgeSetIdRef>>
              <ChatBadgeId as IntoCow<'a, ChatBadgeIdRef>>
            and 89 others
rustc[E0277](rust-analyzer-diagnostics-view:/diagnostic%20message%20%5B2%5D?2#file%3A.cargo%2Fgit%2Fcheckouts%2Ftwitch_api-e5fea103d3f2733c%2Fdd1fae3%2Fsrc%2Fhelix%2Fclient%2Fclient_ext.rs)
client_ext.rs(377, 19): required by a bound introduced by this call
get_broadcaster_subscriptions.rs(70, 48): required by a bound in `GetBroadcasterSubscriptionsRequest::<'a>::broadcaster_id`

I don't have enough rust skills to dissect all that I think, that's why I'm asking for help and reporting this error in order to check if this is indeed a bug between versions or if it just comes from me, this uqi is possible ^^

from twitch_api.

Nerixyz avatar Nerixyz commented on August 17, 2024

Oh my bad, you need to add the following if you take twitch_api as a git dependency (see #256):

[dependencies]
twitch_api = { git = "https://github.com/twitch-rs/twitch_api.git", branch = "deps/reqwest-http-and-stuff", features = ["..."] }

[patch.crates-io.twitch_types]
git = "https://github.com/twitch-rs/twitch_api.git"
branch = "deps/reqwest-http-and-stuff" # pretty sure you need that too

from twitch_api.

Nakuromi avatar Nakuromi commented on August 17, 2024

Ho yes, I forgot to add the patch even though I should have added it before (#256 ) ^^

So, the patch fix previous UserIdRef error but there is always error like first :

error[E0277]: the trait bound `twitch_api::TwitchClient<'_, reqwest::Client>: twitch_oauth2::client::Client` is not satisfied
   --> twitch_access_token_manager\twitch_oauth_connection.rs:103:101
    |
103 |     let twitch_user_token = self::get_twitch_auth_secret(secrets_manager, "twitch_auth_user_token", &client);
    |                             ----------------------------                                            ^^^^^^^ the trait `twitch_oauth2::client::Client` is not implemented for `twitch_api::TwitchClient<'_, reqwest::Client>`
    |                             |
    |                             required by a bound introduced by this call
    |
    = help: the following other types implement trait `twitch_oauth2::client::Client`:
              twitch_oauth2::client::DummyClient
              reqwest::Client
rustc[E0277](rust-analyzer-diagnostics-view:/diagnostic%20message%20%5B3%5D?3#file%3Atwitch_access_token_manager%2Ftwitch_oauth_connection.rs)
twitch_oauth_connection.rs(103, 29): required by a bound introduced by this call
twitch_oauth_connection.rs(686, 14): required by a bound in `twitch_access_token_manager::twitch_oauth_connection::get_twitch_auth_secret`

from twitch_api.

Emilgardis avatar Emilgardis commented on August 17, 2024

you need to also patch twitch_oauth2 to be the git branch

from twitch_api.

Emilgardis avatar Emilgardis commented on August 17, 2024

#404 is merged now, so Cargo.toml should be

[dependencies]
twitch_api = { git = "https://github.com/twitch-rs/twitch_api/" }
twitch_oauth2 = { git = "https://github.com/twitch-rs/twitch_api/" }
twitch_types = { git = "https://github.com/twitch-rs/twitch_api/" }

# workaround for https://github.com/twitch-rs/twitch_api/issues/256
[patch.crates-io.twitch_types]
git = "https://github.com/twitch-rs/twitch_api"
[patch.crates-io.twitch_oauth2]
git = "https://github.com/twitch-rs/twitch_api"

note, you may have to do cargo update -p twitch_api -p twitch_types -p twitch_oauth2

from twitch_api.

Emilgardis avatar Emilgardis commented on August 17, 2024

Does it work now @Nakuromi ?

from twitch_api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.