gtk-rs / gtk4-rs

Rust bindings of GTK 4
https://gtk-rs.org/gtk4-rs/
MIT License
1.75k stars 168 forks source link

Investigate how to detangle gtk4-macros / gtk4 circular dependency #823

Open sdroege opened 2 years ago

sdroege commented 2 years ago

This prevents uploading them without --no-verify. gtk3-macros and glib-macros don't have such a problem.

$ cargo publish
   Updating crates.io index
   Packaging gtk4-macros v0.4.1 (/home/slomo/Projects/rust/gtk-rs/gtk4-rs/gtk4-macros)
   Verifying gtk4-macros v0.4.1 (/home/slomo/Projects/rust/gtk-rs/gtk4-rs/gtk4-macros)
error: failed to verify package tarball

Caused by:
  failed to select a version for the requirement `gtk4 = "^0.4.1"`
  candidate versions found which didn't match: 0.3.1, 0.3.0, 0.2.0, ...
  location searched: crates.io index
  required by package `gtk4-macros v0.4.1 (/home/slomo/Projects/rust/gtk-rs/gtk4-rs/target/package/gtk4-macros-0.4.1)`
jf2048 commented 2 years ago

The only major problem with this is the tests and doc tests, right? It seems like it's safe to turn those off temporarily right before publish.

But wait, how come glib-macros is able to use { path = "../glib" } without a version, but we can't do that here?

sdroege commented 2 years ago

It seems like it's safe to turn those off temporarily right before publish.

You can't publish with local changes (unless you force cargo), so that's not solving much :)

sdroege commented 2 years ago

But wait, how come glib-macros is able to use { path = "../glib" } without a version, but we can't do that here?

Very curious, how does that even work? Probably because it's a dev-dependency but even then that shouldn't be allowed...