feat(package): add unstable --message-format
flag by weihanglo · Pull Request #15311 · rust-lang/cargo (original) (raw)
This is a schema we are expecting people to use programmatically but
- We are keeping internal the helpers for doing so, leaving them to the documentation.
- The serialization schema is tied directly to the implementation in a location that doesn't call out this is for serialization. This makes it harder for us to track schema changes (e.g. a refactor to rename a field). At least the
impl Serialize
is hand written which helps call it out but it might not always be that way. We do have tests but those can't exhaustively cover every case.
I also would like to see every existing serialization schema moved there.
I'd like to flip the script and instead of waiting on a need, for us to proactively do it. It will reduce the work we need to do later to take care of this if we do it in the first place. I held off on this for sboms mostly because I brought it up late in the process.
Yes, this could be done at stabilization. We'd need to track that as work to do for that. I also like to see stabilization make as small of a change as possible so its easier to review and has less risk.
Maybe waiting until later in the pre-stabilization process can help if there is expected churn in the overall design that it would require major rework (e.g. --list json
vs --message-format json
can end up with very different needs)