Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Cargo.toml dependency with both git and path #205

Closed
TheBiggerGuy opened this issue Oct 8, 2018 · 4 comments
Closed

Cargo.toml dependency with both git and path #205

TheBiggerGuy opened this issue Oct 8, 2018 · 4 comments

Comments

@TheBiggerGuy
Copy link

I get a "Dependabot couldn't find a Cargo.toml for this project" due to a Cargo.toml dependency with both git and path properties.

Example TOML line:

google-photoslibrary1 = { git = "https://github.com/TheBiggerGuy/google-apis-rs", path = "gen/photoslibrary1", branch = "photoslibrary_str_int" }

Repo files;

@greysteil
Copy link
Contributor

Ah, interesting, I haven't seen a situation like this where you have both path and it sources. How does Cargo choose between them?

If Cargo is happy with the project then it's definitely a bug that Dependabot isn't and I'll get it sorted.

@greysteil
Copy link
Contributor

This should be fixed in dependabot/dependabot-core@f1e7406. Once that's deployed I'll re-run it on your project and it should automatically close the issue.

Thanks for the bug report!

@TheBiggerGuy
Copy link
Author

Thanks, everything seems to work fine now.

Please not there is a warning from Cargo that this is a soon to be a deprecated feature. I am unsure if you should support this if it is about to be removed.
warning: dependency (google-photoslibrary1) specification is ambiguous. Only one of `git` or `path` is allowed. This will be considered an error in future versions

From rust-lang/cargo#1462 (comment) it seems that Cargo looks throughout the whole git checkout for the name specified. I have just tested this and it seems to work.

@greysteil
Copy link
Contributor

👍 - I did wonder! We'll remove support when Cargo do.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants