Skip to content

Commit

Permalink
Further explain unused_patches.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Jul 29, 2019
1 parent e26ef01 commit abf2bb4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/cargo/core/resolver/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ pub struct Resolve {
/// forwards compatibility.
metadata: Metadata,
/// `[patch]` entries that did not match anything, preserved in
/// `Cargo.lock` as the `[[patch.unused]]` table array.
/// TODO: *Why* is this kept in `Cargo.lock`? Removing it doesn't seem to
/// affect anything.
/// `Cargo.lock` as the `[[patch.unused]]` table array. Tracking unused
/// patches helps prevent Cargo from being forced to re-update the
/// registry every time it runs, and keeps the resolve in a locked state
/// so it doesn't re-resolve the unused entries.
unused_patches: Vec<PackageId>,
/// A map from packages to a set of their public dependencies
public_dependencies: HashMap<PackageId, HashSet<PackageId>>,
Expand Down

0 comments on commit abf2bb4

Please sign in to comment.