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

[RFC] code name support #3688

Closed
wants to merge 1 commit into from

Conversation

practicalrs
Copy link

@practicalrs practicalrs commented Sep 4, 2024

Support the following

[package]
name = "mbdf"
version = "0.2.0"
edition = "2021"
code_name = "Bailey"

Rendered

@practicalrs practicalrs changed the title code name support [RFC] code name support Sep 4, 2024
@Veykril Veykril added the T-cargo Relevant to the Cargo team, which will review and decide on the RFC. label Sep 4, 2024
@Turbo87 Turbo87 added the T-crates-io Relevant to the crates.io team, which will review and decide on the RFC. label Sep 4, 2024
Copy link
Member

@Turbo87 Turbo87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is nothing stopping people from already declaring a certain major version number as "Codename: Ace" or something like that. The only thing that they currently don't get is these codenames being visible in cargo and crates.io, but I'm not sure the additional work and complexity is worth the IMHO very small benefit of this feature. Authors are already able to use these codenames in the README (rendered on crates.io) and in their doc comments (rendered on docs.rs).

Many software projects use code names for their releases. It allows you the possibility
to refer to a program not only by its version number but also by code name or marking name.

For example instead of Windows 4.0.950 C people usually say Windows 95.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows 95 might also refer to v4.0.951 and v4.1.234 though. I guess it's more like a grouping of versions, not a singular version.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is why I wrote "and for each major or minor release" - depends on the convention that you want to use.

@epage
Copy link
Contributor

epage commented Sep 4, 2024

To add, there is the metadata field in the version number that can be used for this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While not highly relevant, I have a feeling that we tend not to add more “metadata-like” fields to Cargo.toml. We've deprecated [badges] table and made package.authors optional. I'd like to know more on why we need a standardized field of it, otherwise package.metadata seems sufficient.

@ChrisDenton
Copy link
Member

To add, there is the metadata field in the version number that can be used for this.

I wasn't aware of this but you can indeed do 1.0.0+nickname. I couldn't find it mentioned in the Cargo docs but the semver spec has this: https://semver.org/#spec-item-10

@practicalrs
Copy link
Author

Ok, let's close it.

Thanks for all the comments.

@practicalrs practicalrs closed this Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-cargo Relevant to the Cargo team, which will review and decide on the RFC. T-crates-io Relevant to the crates.io team, which will review and decide on the RFC.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants