File tree 3 files changed +50
-3
lines changed
3 files changed +50
-3
lines changed Original file line number Diff line number Diff line change @@ -183,11 +183,11 @@ fn read_nested_packages(
183
183
v. insert ( pkg) ;
184
184
}
185
185
Entry :: Occupied ( _) => {
186
- info ! (
187
- "skipping nested package `{}` found at `{}`" ,
186
+ let _ = config . shell ( ) . warn ( format ! (
187
+ "skipping duplicate package `{}` found at `{}`" ,
188
188
pkg. name( ) ,
189
189
path. to_string_lossy( )
190
- ) ;
190
+ ) ) ;
191
191
}
192
192
}
193
193
Original file line number Diff line number Diff line change @@ -1023,6 +1023,52 @@ Caused by:
1023
1023
. run ( ) ;
1024
1024
}
1025
1025
1026
+ #[ cargo_test]
1027
+ fn dep_ambiguous ( ) {
1028
+ let project = project ( ) ;
1029
+ let git_project = git:: new ( "dep" , |project| {
1030
+ project
1031
+ . file ( "aaa/Cargo.toml" , & basic_manifest ( "bar" , "0.5.0" ) )
1032
+ . file ( "aaa/src/lib.rs" , "" )
1033
+ . file ( "bbb/Cargo.toml" , & basic_manifest ( "bar" , "0.5.0" ) )
1034
+ . file ( "bbb/src/lib.rs" , "" )
1035
+ . file ( "ccc/Cargo.toml" , & basic_manifest ( "bar" , "0.5.0" ) )
1036
+ . file ( "ccc/src/lib.rs" , "" )
1037
+ } ) ;
1038
+
1039
+ let p = project
1040
+ . file (
1041
+ "Cargo.toml" ,
1042
+ & format ! (
1043
+ r#"
1044
+ [project]
1045
+
1046
+ name = "foo"
1047
+ version = "0.5.0"
1048
+ authors = ["wycats@example.com"]
1049
+
1050
+ [dependencies.bar]
1051
+ git = '{}'
1052
+ "# ,
1053
+ git_project. url( )
1054
+ ) ,
1055
+ )
1056
+ . file ( "src/main.rs" , "fn main() { }" )
1057
+ . build ( ) ;
1058
+
1059
+ p. cargo ( "build" ) . run ( ) ;
1060
+ p. cargo ( "run" )
1061
+ . with_stderr (
1062
+ "\
1063
+ [WARNING] skipping duplicate package `bar` found at `[..]`
1064
+ [WARNING] skipping duplicate package `bar` found at `[..]`
1065
+ [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
1066
+ [RUNNING] `target/debug/foo[EXE]`
1067
+ " ,
1068
+ )
1069
+ . run ( ) ;
1070
+ }
1071
+
1026
1072
#[ cargo_test]
1027
1073
fn two_deps_only_update_one ( ) {
1028
1074
let project = project ( ) ;
Original file line number Diff line number Diff line change @@ -870,6 +870,7 @@ fn override_and_depend() {
870
870
. cwd ( "b" )
871
871
. with_stderr (
872
872
"\
873
+ [WARNING] skipping duplicate package `a2` found at `[..]`
873
874
[COMPILING] a2 v0.5.0 ([..])
874
875
[COMPILING] a1 v0.5.0 ([..])
875
876
[COMPILING] b v0.5.0 ([..])
You can’t perform that action at this time.
0 commit comments