File tree Expand file tree Collapse file tree 3 files changed +19
-29
lines changed Expand file tree Collapse file tree 3 files changed +19
-29
lines changed Original file line number Diff line number Diff line change @@ -63,24 +63,16 @@ impl<'gctx> Source for DependencyConfusionThreatOverlaySource<'gctx> {
6363 } ;
6464 ready ! ( self . local. query( & local_dep, kind, & mut local_callback) ) ?;
6565
66- let mut package_collision = None ;
6766 let mut remote_callback = |index : IndexSummary | {
6867 if local_packages. contains ( index. as_summary ( ) ) {
69- package_collision = Some ( index. as_summary ( ) . clone ( ) ) ;
68+ tracing:: debug!( ?local_source, ?remote_source, ?index, "package collision" ) ;
69+ } else {
70+ f ( index)
7071 }
71- f ( index)
7272 } ;
7373 ready ! ( self . remote. query( dep, kind, & mut remote_callback) ) ?;
7474
75- if let Some ( collision) = package_collision {
76- std:: task:: Poll :: Ready ( Err ( anyhow:: anyhow!(
77- "found a package in the remote registry and the local overlay: {}@{}" ,
78- collision. name( ) ,
79- collision. version( )
80- ) ) )
81- } else {
82- std:: task:: Poll :: Ready ( Ok ( ( ) ) )
83- }
75+ std:: task:: Poll :: Ready ( Ok ( ( ) ) )
8476 }
8577
8678 fn invalidate_cache ( & mut self ) {
Original file line number Diff line number Diff line change @@ -6056,20 +6056,21 @@ fn workspace_with_local_dep_already_published_nightly() {
60566056 p. cargo ( "package -Zpackage-workspace" )
60576057 . masquerade_as_nightly_cargo ( & [ "package-workspace" ] )
60586058 . replace_crates_io ( reg. index_url ( ) )
6059- . with_status ( 101 )
60606059 . with_stderr_data (
60616060 str![ [ r#"
60626061[PACKAGING] dep v0.1.0 ([ROOT]/foo/dep)
60636062[PACKAGING] main v0.0.1 ([ROOT]/foo/main)
60646063[UPDATING] crates.io index
6065- [ERROR] failed to prepare local package for uploading
6066-
6067- Caused by:
6068- failed to get `dep` as a dependency of package `main v0.0.1 ([ROOT]/foo/main)`
6069-
6070- Caused by:
6071- found a package in the remote registry and the local overlay: dep@0.1.0
60726064[PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed)
6065+ [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed)
6066+ [VERIFYING] dep v0.1.0 ([ROOT]/foo/dep)
6067+ [COMPILING] dep v0.1.0 ([ROOT]/foo/target/package/dep-0.1.0)
6068+ [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
6069+ [VERIFYING] main v0.0.1 ([ROOT]/foo/main)
6070+ [UNPACKING] dep v0.1.0 (registry `[ROOT]/foo/target/package/tmp-registry`)
6071+ [COMPILING] dep v0.1.0
6072+ [COMPILING] main v0.0.1 ([ROOT]/foo/target/package/main-0.0.1)
6073+ [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
60736074
60746075"# ] ]
60756076 . unordered ( ) ,
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ fn overlay_version_wins() {
133133}
134134
135135#[ cargo_test]
136- fn version_collision ( ) {
136+ fn version_precedence ( ) {
137137 let ( reg, alt_path) = setup ( ) ;
138138 let p = project ( )
139139 . file (
@@ -161,16 +161,13 @@ fn version_collision() {
161161
162162 p. cargo ( "check" )
163163 . overlay_registry ( & reg. index_url ( ) , & alt_path)
164- . with_status ( 101 )
165164 . with_stderr_data ( str![ [ r#"
166165[UPDATING] `sparse+http://127.0.0.1:[..]/index/` index
167- [ERROR] failed to get `baz` as a dependency of package `foo v0.0.1 ([ROOT]/foo)`
168-
169- Caused by:
170- failed to query replaced source registry `crates-io`
171-
172- Caused by:
173- found a package in the remote registry and the local overlay: baz@0.1.1
166+ [LOCKING] 1 package to latest compatible version
167+ [UNPACKING] baz v0.1.1 (registry `[ROOT]/alternative-registry`)
168+ [CHECKING] baz v0.1.1
169+ [CHECKING] foo v0.0.1 ([ROOT]/foo)
170+ [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
174171
175172"# ] ] )
176173 . run ( ) ;
You can’t perform that action at this time.
0 commit comments