Skip to content

Rust: stop hardcoding the crates.io registry URL

Created by: olafurpg

In https://github.com/sourcegraph/sourcegraph/pull/37064, we added support to sync crates with an "index repository" like github.com/rust-lang/crates.io-index. The root of that repository contains a config.json file that points to a registry URL https://github.com/rust-lang/crates.io-index/blob/master/config.json

We currently hardcode the crates.io URL when downloading crates https://github.com/sourcegraph/sourcegraph/blob/0642347ef8014250468d8e8ececadc700739fa84/cmd/gitserver/server/vcs_syncer_rust_packages.go#L64

We should replace that code with the registry URL from config.json