-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Support depending on crates with any case of the original name #5678
Comments
I think this may already happen? |
If I make a Cargo.toml with:
and then
|
Ah ok, that's a different issue then what's in the title! |
o.O how so? when depending on a crate, doesn't that look up the crate in the index? |
Crate name comparison happens a few places in Cargo. Cargo already case-insensitively looks up the crate in the registry, but the name is later rejected due to the wrong case. It's elsewhere in Cargo's crate graph resolver that the case mapping would need to happen I believe. |
@alexcrichton @carols10cents hey |
I am also waiting on an update to this |
I feel like having something besides the canonical name in |
@epage I don’t understand what you mean or how it’s related to this issue. What is making it harder for tooling to process cargo.toml files? |
If a dependency name can come in any case (or use of |
Knowing how to canonicalize a name is already required for looking it up in the index. So how much more difficult would this really make things? I.E. I don't think progress will be easy or likely, but am not yet convinced that we should close the discussion. |
Looking up in the index requires normalization which is slightly different than canonicalization and a lot of tools don't need to talk to the index and of those that do, it is behind an abstraction like Maybe put another way: right now, tools can just compare keys (or |
Ok I've just seen you now warn about case-sensitive crate names when created. I do think the warning should say the "case can't be changed once its submitted" but it's better than nothing. I'm content with this, as long as users are aware of this issue when submitting new crates. I guess nothing can be done for existing crates. |
Similarly to #2775, because we consider a crate name to be unique no matter what the casing of the name, we should look up crates in the index regardless of whether the casing in a Cargo.toml matches the casing in the index exactly.
The directory and file names in the index are already all lowercase.
The text was updated successfully, but these errors were encountered: