File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -207,8 +207,10 @@ fn sync(
207
207
let dst = canonical_destination. join ( & dst_name) ;
208
208
to_remove. remove ( & dst) ;
209
209
let cksum = dst. join ( ".cargo-checksum.json" ) ;
210
- if dir_has_version_suffix && cksum. exists ( ) {
211
- // Always re-copy directory without version suffix in case the version changed
210
+ // Registries are the only immutable sources,
211
+ // path and git dependencies' versions cannot be trusted to mean "no change"
212
+ if dir_has_version_suffix && id. source_id ( ) . is_registry ( ) && cksum. exists ( ) {
213
+ // Don't re-copy directory with version suffix in case it comes from a registry
212
214
continue ;
213
215
}
214
216
Original file line number Diff line number Diff line change @@ -1626,7 +1626,7 @@ fn git_update_rev() {
1626
1626
. run ( ) ;
1627
1627
1628
1628
let lib = p. read_file ( "vendor/a-0.1.0/src/lib.rs" ) ;
1629
- assert_e2e ( ) . eq ( lib, "" ) ;
1629
+ assert_e2e ( ) . eq ( lib, "pub fn f() {} " ) ;
1630
1630
}
1631
1631
1632
1632
#[ cargo_test]
You can’t perform that action at this time.
0 commit comments