Child Thread: Survey of alternative identifier designs for Cargo and Crates.io
Here is a variant of "unique suffixes"
The RFC 4151 for tag: URIs has to deal with domains changing owners. Their solution is to require the inclusion of a date. or at least a year.
Discord used the #1234 suffix because it did not require the name to be unique at a given time. If you allow renames but forbid duplicates then using a disambiguator derived from the time may offer a better DX.
For example a package may be uniquely identified by its name and date of first publication, such as serde#2014. The recommendation would be to include this year in the manifest (eventually require it?) as in serde#2014 = "1.0.228", you'd import it without the #, so just use serde; same as today.
If they decide to rename to deser then consumers would be able to specify it in their toml as either serde#2014 or deser#2026. Using the older name would trigger a warning to update it. If no year is specified, cargo defaults to resolve the oldest crate with this name.
After the rename to deser#2026, the name serde becomes available again and someone else can claim it again. The fully-qualified identity of this new package is then serde#2026. Consumers must use the fully qualified name to use this new package.
You may also support aliases for all the years when a release was published. So serde#2020 is an alias for serde#2014.
Compared to "unique suffixes" with random ids from the original post, this helps with communication of packages or publication to multiple registries.
Discussion in the ATmosphere