-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
When cargo pulls a dependent library crate from git, it attempts to reference the dependent library's dev-dependencies. #4993
Comments
Thanks for the report! What version of Cargo are you using? I would have expected this to be caught by this logic... |
|
From the error message it looks to me like it is bailing out due to |
I guess you need to decide whether you should accept a missing |
...but then again, that feels like a bit of a hack. The fundamental issue is that it is reading dev dependencies when it should be ignoring them. Makes me wonder whether |
Ah indeed! I think we'd probably just apply the same fix here, in this case the "malformed manifest" is mostly just a different one I think |
As there hasn't been any activity here in over 6 months I've marked this as stale and if no further activity happens for 7 days I will close it. I'm a bot so this may be in error! If this issue should remain open, could someone (the author, a team member, or any interested party) please comment to that effect? The team would be especially grateful if such a comment included details such as:
Thank you for contributing! (The cargo team is currently evaluating the use of Stale bot, and using #6035 as the tracking issue to gather feedback.) If you're reading this comment from the distant future, fear not if this was closed automatically. If you believe it's still an issue please leave a comment and a team member can reopen this issue. Opening a new issue is also acceptable! |
As I didn't see any updates in 30 days I'm going to close this. Please see the previous comment for more information! |
Description
When Cargo pulls a dependent library crate from
git
, it attempts to reference the dependent library's dev-dependencies. If these are not present, it complains that it cannot find theirCargo.toml
.If Cargo.toml references the same dependent library by path then the operation works as expected (dev-dependencies are ignored).
The cargo docs say:
Both of these comments imply that cargo should not be attempting to reference dev-dependencies when building a lib crate into another package.
Repro
I’ve got a test lib:
The devtools directory does not exist in code management (the git repo) - it is auto-generated by external tools when developing locally.
I’ve also got a test bin that uses this lib:
If I refer to the lib via a local path it compiles (i.e. ignores the dev-dependencies), which is the expected behaviour.
If I comment out the path version and replace with the git version then it fails, as it appears the git repo-fetching code looks in the empty
devtools
directory forCargo.toml
, and fails when it can't find it.The text was updated successfully, but these errors were encountered: