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

Error on crates depending on binary crates #66

Closed
flodiebold opened this issue Feb 10, 2019 · 4 comments
Closed

Error on crates depending on binary crates #66

flodiebold opened this issue Feb 10, 2019 · 4 comments

Comments

@flodiebold
Copy link

If I have a workspace with a binary crate and another crate declaring a dependency on that binary crate (notwithstanding whether that makes sense), cargo metadata outputs a depedency with name null. Since cargo-metadata expects dependencies to always have a name, it fails to deserialize that metadata.

Here's a minimal reproduction: https://github.com/flodiebold/cargo-metadata-bug

@oli-obk
Copy link
Owner

oli-obk commented Feb 10, 2019

Huh. Isn't that rather a bug in cargo metadata? Shouldn't it be emitting the binary crate's name?

@flodiebold
Copy link
Author

I'm not sure. I guess since you can't really use the binary crate from the code, it puts null there? I haven't investigated it further so far...

@ehuss
Copy link
Contributor

ehuss commented Feb 10, 2019

I mentioned this here, and have a PR to change it on the Cargo side (rust-lang/cargo#6534). However, there is some minor disagreement on how it should be fixed.

@ehuss
Copy link
Contributor

ehuss commented Apr 6, 2019

This is now fixed on the latest nightly (via rust-lang/cargo#6534), so I think this can be closed.

@oli-obk oli-obk closed this as completed Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants