Open Emilgardis opened 2 years ago
For future visitors, after the move from twitch_api2
to twitch-rs/twitch_api
:
[dependencies]
# rev isn't required, but it's good to pin a specific revision
twitch_api = { git = "https://github.com/twitch-rs/twitch_api.git", rev = "340a582" }
# workaround for https://github.com/twitch-rs/twitch_api/issues/256
[patch.crates-io.twitch_types]
git = "https://github.com/twitch-rs/twitch_api.git"
rev = "340a582" # only if you pinned the repo to a specific revision
If you don't want to rename every import of twitch_api2
to twitch_api
, add the following line in your main.rs
/ lib.rs
:
extern crate twitch_api as twitch_api2;
It's also possible to do
[dependencies]
twitch_api2 = {package = "twitch_api", ...}
Oh didn't know that. It's much better than extern crate
.
Can this be solved neatly without requiring a patch?
Just ran into this again. Maybe this should be a monorepo instead of using submodules? I'm not sure how releasing works then, however.
I don't think monorepo solves it, since the source for the twitch_types
would still be crates-io
when twitch_api
is included as a git
source.
eframe
/egui
has the same problem, see https://github.com/emilk/eframe_template/blob/02ee968537e783e375a0e439426518bf91e762b6/Cargo.toml#L41-L43
Due to how we currently have
twitch_types
used intwitch_api2
andtwitch_oauth2
, there's a wierd interaction happening due to the two twitch_api crates used are not the same due to pathing.To circumvent the issue, users that have specified
twitch_api2
as a path or git dependency will need to do the following:this issue manifests as
Can this be solved neatly without requiring a patch?