Skip to content

Add lazy sync support for Rust packages

Warren Gifford requested to merge olafurpg/lazy-pkg-sync into main

Created by: olafurpg

Previously, Sourcegraph returned 404 when visiting the correct URL of an Rust package with a concrete version that wasn't tracked. This commit fixes that issue so that Sourcegraph lazy syncs the package+version and returns a 200 instead of 404.

This already worked for other package hosts like npm/pypi, this PR only adds the same support for Rust packages.

Fixes https://github.com/sourcegraph/sourcegraph/issues/37921

Test plan

The change was manually tested with the command

SOURCEGRAPHDOTCOM_MODE=true sg start

and then visiting the URL of a crate that has not been tracked locally, for example https://sourcegraph.test:3443/crates/[email protected]

Merge request reports

Loading