-
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
Add metadata subcommand to cargo #2193
Comments
• What data and in what format should metadata provide? @dan-t, @lunaryorn
could you experiment with it and give feedback?
As long as I'm getting the source path of all dependencies, including
local path dependencies and local overrides, I'm fine for my use case.
|
In terms of format, I think it should probably default to the Cargo standard of TOML but also be configurable to other formats like JSON or perhaps just some textual encoding. I wouldn't be too worried about that, however. In terms of what data this should provide, I think that basically exposing the standard structures of #1434 seemed pretty promising to me but it unfortunately stalled :( |
I will try update #1434 then |
@alexcrichton am I correct that |
Yeah I think it's fine to start a new |
@alexcrichton any progress on this? It really impedes us introducing fully-fledged Cargo's projects support in https://github.com/intellij-rust/intellij-rust. |
(any suggestions about what sort of output you'd like to see would also be quite welcome!) |
Most of the work was done by @dan-t in rust-lang#1225 and by @winger in rust-lang#1434 Fixes rust-lang#2193
Most of the work was done by @dan-t in #1225 and by @winger in #1434 Fixes #2193 I failed to properly rebase previous attempts so I just salvaged this from bits and pieces. @alexcrichton are you sure that the default format should be TOML? I think that TOML is more suitable for humans, and JSON is better (at the moment at least) for tools. Maybe we should default to ~~TOML~~ JSON?
This is a follow up of #1225, #1434 and #2091
cc @dan-t @lunaryorn @winger @alexcrichton
Currently we have an external sub command by @winger. The fork compatible with the recent version of cargo is here. It is very experimental, but already can be used to extract valuable metadata (a proof by gif). It depends on the dev version of cargo and is not available on crates.io, but you can
cargo install --git https://github.com/intellij-rust/cargo-metadata
it.I would really like to include this sub command to cargo:
So I ask the following questions:
The text was updated successfully, but these errors were encountered: