api-guidelines
api-guidelines copied to clipboard
C-METADATA: Change `authors` field to optional
Per RFC 3052, the authors field in Cargo.toml is now optional, and this fact should be widely communicated.
See also:
- https://github.com/rust-lang/rfcs/pull/3052
- https://github.com/rust-lang/rust/issues/83227
It's not clear to me that our advice should change here. That it was marked optional doesn't mean we should stop recommending its use.
My intention was definitely not to stop recommending its use. I made sure to use the same phrasing as the one for documentation ("only needs to be set if...") instead of the stronger phrasing used for homepage ("should only be set if...").
The reason I included that it can still be used if the metadata is used directly by the crate was that it's the specific use case mentioned in RFC 3052.
Any suggestions on how to phrase it better?
Ah, now I think I understand what you're saying, sorry. I suppose the RFC became very crates.io-focused, and that the fact that it's optional for publishing to crates.io doesn't imply that it should be optional in the guidelines.
However, I guess the question then would be why the API guidelines should recommend its use? The RFC discussion uncovered several problems with it. Could we perhaps warn about them here? It should only be used if you want to tie authorship to a specific version, or something? I'm not sure.
What's the reason for recommending it?
It was probably recommended because it was required by crates.io at some point, so is just historical. I find your change an improvement (and a correction).