commit | 33e18204e498426aa20a2efcda94cd1b6c8a4070 | [log] [tgz] |
---|---|---|
author | Julian Schmid <info@julianschmid.name> | Wed Dec 13 16:52:11 2023 +0100 |
committer | GitHub <noreply@github.com> | Wed Dec 13 15:52:11 2023 +0000 |
tree | 63f69150616ba6e1769a136dd8831b57b318b3fd | |
parent | 617db9f0491d1def813ed4de218bfd6a33b556f9 [diff] |
cargo-bazel: Corrected sparse registry splicing code (#2325) This is a fix for supporting sparse-registries (private). ### Issue: When we tried to use crate_universe together with an internal sparse registry (Artifactory) we ran into an issue. `cargo-bazel splice` was not correctly detecting sparse registries as "sparse", even though the URLs correctly started with the "sparse+https://" prefix in the Cargo.lock file. Instead it re-interpreted them as registries with a git index. The root cause of this is that`cargo_lock::Lockfile` automatically removes the prefix `sparse+` from the URL and the only way to determine that a registry is sparse is to check the `kind`. The code previously assumed it could check for sparse registries by checking if the url starts with "sparse+https://". ### Problem solution: This pull requests adapts the code so it uses the lockfile "SourceKind" instead of the URL to check if a registry is sparse or not.
This repository provides rules for building Rust projects with Bazel.
General discussions and announcements take place in the GitHub Discussions, but there are additional places where community members gather to discuss rules_rust
.
Please refer to the full documentation.