nabijaczleweli/cargo-update

Source replace broken

DCjanus opened this issue · 6 comments

Because of network block in China, I'm using a public proxy for crates.io in China, and found broken behavior:

图片

Here is my config file:

[source.crates-io]
replace-with = "sjtu"

[source.sjtu]
registry = "https://mirrors.sjtug.sjtu.edu.cn/git/crates.io-index"

I was trying to found root cause of this, but I failed, if there is any help, would be great.

PS: remove 'replace-with' and update my packages from official registry, and put replace-with back, nothing happend.

I see, in this line, in my config, value of registry_name is sjtu, which is used in this line, which should be custom registry rather than replace-with.

I think I can fix this, PR on the way.

BTW, is that ok if I want to run cargo fmt in this repo?

Please don't if you plan on sending a patch, newer rustfmts format differently from what's used here, creating a lot of needless noise.

How could I run rustfmt that used here. That's would be helpful if I can use it when I was trying to modify some codes.

The baseline rustfmt is

T:\>rustfmt --version
0.7.1 ()

but don't worry too much about the formatting. Or just use whatever you have and I'll figure it out, no worries.

Released in v4.1.0.