Skip to content

Pin git dependencies in Cargo.toml #42027

@jschwe

Description

@jschwe

Instead of just pointing to a branch and relying on our Cargo.lock, we should pin git dependencies to a specific commit (or tag) in Cargo.toml.
This makes it much easier for third-party embedders to get the same dependency versions as servo has.
Medium to Long-term we should try to use releases from crates.io, but short term this seems like a solution that makes updating slightly more manual work for us, but makes it much easier for embedders.

See also feedback from slint-ui/slint#10491 (reply in thread)

Example fix:

[dependencies]
regex = { git = "https://github.com/rust-lang/regex.git", rev = "commit-hash" }

See also: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-less-complexStraightforward. Recommended for a new contributor.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions