Tracking Issue for JSON output format of cargo package --list
· Issue #15353 · rust-lang/cargo (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
Summary
Original issue: #11666
Implementation: #15311
Documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html##package-message-format
The --message-format
flag in cargo package
controls the output message format. The initial purpose of the flag is providing an alternative JSON output format for file listing of the --list
flag.
Unresolved Issues
--list json
or--message-format json
, see feat(package): add unstable --message-format flag #15311 (comment)- a single json blob vs N? What is N? See feat(package): add unstable --message-format flag #15311 (comment)
- Is the current format
plain
orhuman
, see feat(package): add unstable --message-format flag #15311 (comment) - snake_case or kebab-case for the JSON schema, see feat(package): add unstable --message-format flag #15311 (comment)
- Should the path to the file on disk be absolute paths or relative?
- (The current implementation) Using absolute paths is less ambiguous, but then users need to post-handle them.
- Relative paths makes the JSON blob smaller and more reproducible, though not sure why
cargo package --list
needs this level of reproducibility.
- Should the
path
field follow symlinks? There might be a use case needing to know if a packaged file was a symlink. This could also be future extension that the JSON provides more file metadata.
Future Extensions
No response
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.