Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

having some sort of semver for git dependencies #6961

Closed
elichai opened this issue May 20, 2019 · 2 comments
Closed

having some sort of semver for git dependencies #6961

elichai opened this issue May 20, 2019 · 2 comments
Labels
A-git Area: anything dealing with git C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-needs-rfc Status: Needs an RFC to make progress.

Comments

@elichai
Copy link

elichai commented May 20, 2019

If 2 crates import a dependency from git and it's even a bit different cargo treats them as 2 unrelated crates.

let's say crate A has this toml:

[package]
name = "a"
version = "0.0.1"

[dependencies]
serde = { git = "https://github.com/serde-rs/serde.git", features = ["serde_derive"] }

and contains this struct: #[derive(Serialize)] struct Arr([u8; 32])

crate B has this toml:

[package]
name = "b"
version = "0.0.1"

[dependencies]
a = { path = "../a" }
serde = { git = "https://github.com/serde-rs/serde.git", rev = "fd9d334", features = ["serde_derive"] }

and contains this:

use a::Arr;
#[derive(Serialize)] 
struct BetterArr(Arr)

This will complain that Arr doesn't implement Serialize.
even though technically they point to the exact same thing.
and even if they're not pointing to the same thing I would've hoped there would be a way for me to do something similar to crate = "=1.0.1" and lock to an exact revision/tag/branch.

Thanks!

@PiDelport
Copy link

(Anyone running into this issue should probably look at #7497, which collects several related issues.)

@epage epage added the S-needs-rfc Status: Needs an RFC to make progress. label Nov 1, 2023
@epage
Copy link
Contributor

epage commented Nov 1, 2023

This appears to be a duplicate of #6921, closing in favor of that.

@epage epage closed this as not planned Won't fix, can't repro, duplicate, stale Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-git Area: anything dealing with git C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-needs-rfc Status: Needs an RFC to make progress.
Projects
None yet
Development

No branches or pull requests

4 participants