Pre-RFC: User namespaces on crates.io

I really like the reframing of the discussion as problems and use-cases to solve.

Namespaces are a particular solution, but they aren't a problem to solve.

This hits the XY problem pattern of miscommunication. We've had a lot of posts written from the perspective of "I want this solution, here's how you implement it", but without explicit definition of why, and what problem does it solve.

Maybe the same problems that are solved with namespaces could be solved in different ways? Probably not one single thing, but a combination of them.

  • Cargo already supports package aliases, names of libraries independent of crate names, and alternative registries. Those are existing tools to work with. If they're not sufficient, maybe they'd work if they were extended/improved?

  • Crates are tied to crates.io website. The website could do a lot more to display ownership, groups of crates, TOML snippets with package aliases.

  • There's crates.io API with ownership information. Crates can verifiably associate themselves with GitHub repos via repository link. There are many ways in which tooling could surface and leverage that information.

Please brainstorm ideas around these things, instead of assuming a particular solution from the beginning and then trying to jam it in.

6 Likes