The problem isn't the concept of namespaces but solving the very problems being raised in this thread. I've already called this out before. Most of these concerns were included in Child Thread: Survey of registry namespace designs for Cargo and Crates.io which I was expecting your reply to cover.
I believe my reply did cover the concerns from that link. I was careful to reference it as I was writing the different sections. If there's anything you feel was not covered adequately then I'd be willing to either go into more detail or provide examples of options that would still match this proposal.
Note that the reason I am posting this as a pre-RFC and not a fully detailed RFC is because I specifically want an answer to the question of whether namespaces -- that is, multiple packages with the same crate name but different package names -- are one of the designs that the Cargo / crates.io teams are willing to accept.
The last time I brought this topic up was in response to an email to the team, when I asked if they would be willing to have namespaces, and they said yes -- then on the thread, said no. I don't want to spend two months putting together a fully-designed RFC with all edges covered if that time is likely to be wasted.
I'd also recommend posting relevant content on the relevant threads from that previous summary and focus your points on your incremental differences so people can more easily identify and talk to what is new you are bringing to the table rather than having to sift it out of long, detailed posts. Even knowing content is present in your post, it is hard to find.
I think it would be impolite for me to post unsolicited off-topic proposals on someone else's thread. If someone wants to discuss how to better communicate the organizational trust / reputation of a crate, then my topic (namespaces) would be off-topic. Ditto if someone wants to talk about something like serde and serde-derive.
Dismissing it as "small" I think says more about you then the problem.
I'm not dismissing a monetary cost as "small", but when compared to the other costs involved in publishing Rust packages on crates.io it seems strange to focus on a fee that is an order of magnitude lower than any of the other costs involved (a non-smartphone computer, electric power, internet access).
Being "optional" is an escape hatch proportionate with the expected value. We would be rolling out a major feature to address a problem but those without a domain name would not be able to participate.
Being optional means that it is purely additive -- there would be nobody worse off if the registry supports namespaces. A person who is satisfied with the global namespace would continue to have access to it in exactly the same way they do today, but people who are currently unable to use the global namespace would become able to participate in the crates.io ecosystem.
To use a real-world analogy, the addition of a ramp to a building does not disadvantage people who are able to use the stairs.
Relying on hosting services has a couple of problems (1) those domains are mutable because orgs / usernames are mutable and (2) migrating hosting services is a breaking change.
All meaningful identifiers are mutable, and the requirements state that the identifiers must be meaningful, thus any design is forced to contend with some level of mutability.
The advantage of a domain name is that the name itself is not mutable, which means that there is little motivation to advocate for being able to rename a package. This is an advantage over (for example) usernames, which often change along with an individual's legal name and are therefore much less stable.
While I am for small, incremental RFCs, we need to consider what behavior we will cause with our actions and if that is right. If our answer is to push people to github.io and that is an option with significant problems, then we need to take ownership of that and ensure there is a viable option with a paved path.
I don't have any particular preference for github.io other than to note that crates.io currently depends on GitHub for login, and therefore it's an example of a free hosting service that every single crates.io user is currently guaranteed to have access to.
There are other options for free identities rooted in the domain hierarchy, ranging from straightforward to bureaucratic:
- Straightforward: When non-GitHub crates.io usernames become available they could be used to issue
{username}.users.crates.io namespaces. This may or may not be feasible depending on username mutability, but it would at least be under the complete control of the crates.io admins.
- Bureaucratic: Assign each year a color, each day an animal, and packages within a day a food from a sequential list. I won't be able to publish
john-millikin.com/fuse, but I could publish yellow-elk-bagel.ns.crates.io/fuse, which is good enough. There's various schemes for turning unique numeric digits into memorable phrases, any of them could slot in.
Yes, they are seemingly in conflict with each other. Calling it unreasonable is not accurate and is like saying "memory safety without garbage collection" is unreasonable. We shouldn't shy away from solving apparent contradictions.
I think there's a difference between requirements that are difficult to reconcile, and requirements that structurally cannot be reconciled. The requirements as stated cannot be simultaneously satisfied. There is no possible identity that is immutable, human-meaningful, accurately represents the legal identity of the author, and does not change when ownership of the package is transferred.
As I discussed at Child Thread: Survey of registry namespace designs for Cargo and Crates.io , there may be ways to solve the transfer / rename case. Or maybe we see a strong justification for why we should flex on one of these. Or maybe we go with a completely different solution, like organizational tags, that cover most of the use cases without stepping into this quagmire.
I think one of the challenges I have with the threads you linked is that they seem to have an implicit assumption that the primary purpose of namespaces is reputational. There's a lot of discussion of ways to provide an honest reputation signal -- tagging, verification badges, reserved prefixes -- that aren't namespaces and so therefore don't have any of the properties that I'm looking for.
Meanwhile a lot of the possible designs for namespaces don't provide any reputation signal, so they don't help with things like deciding which packages are part of the Serde or Tokio organization and which are independent productions.
In particular the requirements for a large corporate entity that wants to put their name on their packages as a form of branding are completely different from the requirements for an individual user who just wants to be able to publish their packages to the registry and thereby participate in the ecosystem.