For clarity's sake, we could rename cargo_registry to crates.io throughout the codebase, since I wasn't aware that this was what crates.io used to be called until recently.
I'm on the fence about this-- "crates.io" is what we call this application, and I do generally like the code to match whatever terms people are actually using. However, crates.io is also the URL, and if we support running mirrors or internal company instances, then this codebase will be running somewhere that isn't http://crates.io, and will that be confusing? I don't know! :)
Can you elaborate more on why cargo_registry was a confusing name, and where it was most confusing? The lib crate name (that gets used in the use statements in the tests and the binaries), the database name, all of the above?
Also it would need to be crates_io since periods aren't allowed in Rust identifiers :)
I felt most confused when looking at the lib, and found it interesting it was named cargo_registry. I feel the DB being called cargo_registry was less confusing because I associated registry with a DB :). The confusion came because the application is crates.io, but the lib uses a different name, which I haven't seen in other Rust programs up till now.
Regarding the use of crates.io for private registries, hmm well it depends on what this web app is called. If it's called cargo_registry but was hosted under crates.io, then it makes sense to keep the name, but if it's called crates.io, then that's where I felt the confusion came in. But this is a pretty trivial matter, it certainly doesn't have to be an issue.
crates_io is fine if we do decide to do this rename :)
EDIT: I've realised that another source of confusion is trying to find the crates.io crate on the site, it's actually called cargo_registry under that, and so it would be on docs.rs too.
Just chiming in here, but there already is a crate named crates-io on crates.io: it's the subproject from cargo that is responsible for communicaing with crates.io's API.
So I'm now sure about if/how we should rename this crate in the future.
Ah right. Hm. We could leave the name as cargo_registry, or do something like crates-io-registry, or crates-io-core, or.... anyone have any ideas they like?
closing due to missing activity
Most helpful comment
I'm on the fence about this-- "crates.io" is what we call this application, and I do generally like the code to match whatever terms people are actually using. However, crates.io is also the URL, and if we support running mirrors or internal company instances, then this codebase will be running somewhere that isn't http://crates.io, and will that be confusing? I don't know! :)
Can you elaborate more on why
cargo_registrywas a confusing name, and where it was most confusing? The lib crate name (that gets used in theusestatements in the tests and the binaries), the database name, all of the above?Also it would need to be
crates_iosince periods aren't allowed in Rust identifiers :)