Open olafurpg opened 2 years ago
We now download from the crates.io CDN instead of API. The CDN is not available in config.json so we may need to add a new "cdn"
code host setting to optionally allow downloading from a CDN instead of the "dl"
setting from config.json.
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.jsonWe currently hardcode the
crates.io
URL when downloading crates https://github.com/sourcegraph/sourcegraph/blob/0642347ef8014250468d8e8ececadc700739fa84/cmd/gitserver/server/vcs_syncer_rust_packages.go#L64We should replace that code with the registry URL from
config.json