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

Support --unit-graph #107

Open
est31 opened this issue Apr 14, 2020 · 5 comments
Open

Support --unit-graph #107

est31 opened this issue Apr 14, 2020 · 5 comments

Comments

@est31
Copy link

est31 commented Apr 14, 2020

rust-lang/cargo#8002

rust-lang/cargo#7977

The new feature resolver has turned metadata inadequate for some purposes, so --unit-graph was introduced.

@jyn514
Copy link
Collaborator

jyn514 commented Apr 7, 2021

Which parts of the output should be stabilized? This structure is very low-level, and thus inherently at high risk of changing in the future and being unstable. I think at a minimum we should document that it is not guaranteed to be backwards compatible. Should we filter some fields on stable?

Hmm, does it make sense for cargo_metadata to expose unstable info?

@oli-obk
Copy link
Owner

oli-obk commented Apr 23, 2021

We can put it behind a cargo feature that also enables an unstable rustc feature. That way you can only use it on nightly

@morr0ne
Copy link
Contributor

morr0ne commented Jun 30, 2022

This would prove very useful but I am not sure what the status on this is on cargo considering that rust-lang/cargo#8002 hasn't been updated since 2020

@morr0ne
Copy link
Contributor

morr0ne commented Jul 2, 2022

I was trying to implement parsing of --unit-graph but it doesn't seem like this is the most up to date documentation since during testing additional fields where reported. If someone knows where to get the most up to date documentation it would be great.

@morr0ne
Copy link
Contributor

morr0ne commented Jul 2, 2022

Okay so it looks that https://github.com/rust-lang/cargo/blob/5aad9b302adc2f4cf1f184315f497fb3e3256b78/src/cargo/core/compiler/unit_graph.rs#L39 is getting serialized as is so that could simply copied and pasted and adapted for the crate.

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

No branches or pull requests

4 participants