Skip to content
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

Source replace broken #137

Closed
DCjanus opened this issue Jul 28, 2020 · 6 comments
Closed

Source replace broken #137

DCjanus opened this issue Jul 28, 2020 · 6 comments
Labels

Comments

@DCjanus
Copy link

DCjanus commented Jul 28, 2020

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.

@DCjanus
Copy link
Author

DCjanus commented Jul 28, 2020

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.

@DCjanus
Copy link
Author

DCjanus commented Jul 28, 2020

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

@nabijaczleweli
Copy link
Owner

nabijaczleweli commented Jul 28, 2020

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.

@DCjanus
Copy link
Author

DCjanus commented Jul 28, 2020

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.

@nabijaczleweli
Copy link
Owner

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.

@DCjanus DCjanus changed the title Alternate registry broken Source replace broken Jul 30, 2020
@nabijaczleweli
Copy link
Owner

Released in v4.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants