linebender / druid-widget-nursery

A place where Druid widgets come to mature before moving to the Druid repo.
Apache License 2.0
88 stars 41 forks source link

Cargo.toml dependencies #116

Open maxwell8888 opened 2 years ago

maxwell8888 commented 2 years ago

I am trying out Druid for the first time today. As per the README I have tried using the below in Cargo.toml but I am getting the below error.

[dependencies]
druid = "0.7.0"
druid-widget-nursery = { git = "https://github.com/linebender/druid-widget-nursery" }

[patch.'https://github.com/linebender/druid'.druid]
git = "https://github.com/linebender/druid"
rev = "fc05e965c85fced8720c655685e02478e0530e94"
error: failed to resolve patches for `https://github.com/linebender/druid`

Caused by:
  patch for `druid` in `https://github.com/linebender/druid` points to the same source, but patches must point to different sources

I managed to get a demo working using the below, does this do the same thing?

[dependencies]
druid = { git = "https://github.com/linebender/druid", rev = "fc05e965c85fced8720c655685e02478e0530e94" }
druid-widget-nursery = { git = "https://github.com/linebender/druid-widget-nursery" }
richard-uk1 commented 2 years ago

Hmm, it might be that the patch isn't getting applied. Try doing

[dependencies.druid]
version = "0.7.0"
git = "https://github.com/linebender/druid"
rev = "fc05......"

If there is another druid release, perhaps we could do a widget nursery release to make it easier to use. We can't do this ATM because the most recent druid is quite old. There is a lot of work going on on the fundamentals of druid (see Raph Levien's blog for more info) which is why there haven't been any releases for quite a while.