Skip to content

Usage '[patch.*]` report #55

@EPashkin

Description

@EPashkin

@GuillaumeGomez, @sdroege
I tried use [patch.crates-io] in gtk-rs crates to minimize difference between master and crate branches.
See my test forks https://github.com/EPashkin/examples/tree/as_master,
https://github.com/EPashkin/rust-gnome-sys/tree/as_crate,
https://github.com/EPashkin/glib/tree/as_crate,
https://github.com/EPashkin/cairo/tree/as_crate,
https://github.com/EPashkin/gtk/tree/as_crate
As I used only part crates there there too many [path.*] section in Cargo.toml,
in gtk-rs IMHO it will be only [patch.crates-io].

It works fine until I tried emulate glib version upgrade from 0.6.0 to 0.7.0:
examples tries build both current and next version,
as there already many cons found I stopped checks.

Pros: difference only [patch.crates-io] section,
also as this sections ignored in dependencies IMHO possible just publish crate from master branch

Cons:

  1. Totally incompatible with .cargo\config\path: cargo not allow mixing.
  2. If someone want use git version then he need use [patch.crates-io] too.
  3. Related errors unclear: in next error "0.7.0" is version of conflicting sys (not sure which)
error: failed to select a version for `gtk`.
    ... required by package `gtk-rs-examples v0.0.1 (file:///D:/eap/rust/0/examples)`
versions that meet the requirements `^0` are: 0.7.0

the package `gtk-rs-examples` depends on `gtk`, with features: `v3_22, v3_16, v3_20, v3_10, v3_22_30, v3_18` but `gtk` does not have these features.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions