-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
fix: correct replacing source name #138
Conversation
This... doesn't look right. Take for example the test you edited: it no longer fully resolves down to tralternative, stopping at the registry it originally resolved the URL/name for; why? What final |
Example config file: [source.crates-io]
replace-with = "sjtu"
[source.sjtu]
registry = "https://mirrors.sjtug.sjtu.edu.cn/git/crates.io-index" In this case, origin code, With this PR, that would be In fact, |
If you are trying to reproduce it, try this:
|
Thanks for the details, they've allowed me to verify the implementation and this seems like a cargo regression from I'm going to open an issue on the cargo repository and drink now |
I also came across (well, "came across", I wrote multiple comments and a 6-commit implementation, maybe I'm just old) #128 (comment), which was illuminatory:
I saw I'll write some documentation when I'm less angry and more sober. Thanks again for your testcases, and, mayhap more importantly, persistence. |
Can you try adding this to your config: [registries.sjtu]
index = "https://mirrors.sjtug.sjtu.edu.cn/git/crates.io-index" and running an update operation again? That's what I documented to work in cef1717, and a test result from you would be great. |
Sad to say this: this don't work with me. Here is my config file: [source.crates-io]
replace-with = "sjtu"
[registries.sjtu]
index = "https://mirrors.sjtug.sjtu.edu.cn/git/crates.io-index" I've tried Couldn't get registry for cargo-edit: Couldn't find appropriate source URL for https://github.com/rust-lang/crates.io-index in C:\Users\DCjanus\.cargo\config (resolved to "sjtu"). |
Oh, what a mistake I've made! I've took a wrong title, it should be |
Your entire config unfortunately needs to be: [source.crates-io]
replace-with = "sjtu"
[source.sjtu]
registry = "https://mirrors.sjtug.sjtu.edu.cn/git/crates.io-index"
[registries.sjtu]
index = "https://mirrors.sjtug.sjtu.edu.cn/git/crates.io-index" Can you try that instead? |
I met the same problem with @DCjanus, and when I try this config, after running
So this config doesn't solve the problem. Actually there are many guides for replacing the official crates.io-index with sjtu's mirror in Chinese Internet, which guide people to set the same .cargo/config with @DCjanus 's. It' s not a good choice to force users to edit their config to use
|
Because, well, it doesn't actually solve the underlying problem (that being: cargo's stability guarantees are bullshit) (and also it's kinda subtly wrong in what it produces, but that's beside the point). What's the output of |
Documentation released in |
fix: #137