@@ -515,31 +515,31 @@ impl TomlManifest {
515
515
516
516
// Collect the deps
517
517
try!( process_dependencies ( & mut cx, self . dependencies . as_ref ( ) ,
518
- |dep| dep) ) ;
518
+ |dep| dep, & mut warnings ) ) ;
519
519
try!( process_dependencies ( & mut cx, self . dev_dependencies . as_ref ( ) ,
520
- |dep| dep. set_kind ( Kind :: Development ) ) ) ;
520
+ |dep| dep. set_kind ( Kind :: Development ) , & mut warnings ) ) ;
521
521
try!( process_dependencies ( & mut cx, self . build_dependencies . as_ref ( ) ,
522
- |dep| dep. set_kind ( Kind :: Build ) ) ) ;
522
+ |dep| dep. set_kind ( Kind :: Build ) , & mut warnings ) ) ;
523
523
524
524
if let Some ( targets) = self . target . as_ref ( ) {
525
525
for ( name, platform) in targets. iter ( ) {
526
526
try!( process_dependencies ( & mut cx,
527
527
platform. dependencies . as_ref ( ) ,
528
528
|dep| {
529
529
dep. set_only_for_platform ( Some ( name. clone ( ) ) )
530
- } ) ) ;
530
+ } , & mut warnings ) ) ;
531
531
try!( process_dependencies ( & mut cx,
532
532
platform. build_dependencies . as_ref ( ) ,
533
533
|dep| {
534
534
dep. set_only_for_platform ( Some ( name. clone ( ) ) )
535
535
. set_kind ( Kind :: Build )
536
- } ) ) ;
536
+ } , & mut warnings ) ) ;
537
537
try!( process_dependencies ( & mut cx,
538
538
platform. dev_dependencies . as_ref ( ) ,
539
539
|dep| {
540
540
dep. set_only_for_platform ( Some ( name. clone ( ) ) )
541
541
. set_kind ( Kind :: Development )
542
- } ) ) ;
542
+ } , & mut warnings ) ) ;
543
543
}
544
544
}
545
545
}
@@ -664,7 +664,8 @@ fn validate_bench_name(target: &TomlTarget) -> CargoResult<()> {
664
664
665
665
fn process_dependencies < F > ( cx : & mut Context ,
666
666
new_deps : Option < & HashMap < String , TomlDependency > > ,
667
- mut f : F ) -> CargoResult < ( ) >
667
+ mut f : F ,
668
+ warnings : & mut Vec < String > ) -> CargoResult < ( ) >
668
669
where F : FnMut ( DependencyInner ) -> DependencyInner
669
670
{
670
671
let dependencies = match new_deps {
@@ -680,6 +681,13 @@ fn process_dependencies<F>(cx: &mut Context,
680
681
}
681
682
TomlDependency :: Detailed ( ref details) => details. clone ( ) ,
682
683
} ;
684
+
685
+ if details. version . is_none ( ) && details. path . is_none ( ) && details. git . is_none ( ) {
686
+ warnings. push ( format ! ( "warning: dependency ({}) specified without providing a local \
687
+ path, Git repository, or version to use. This will be \
688
+ considered an error in future versions", n) ) ;
689
+ }
690
+
683
691
let reference = details. branch . clone ( ) . map ( GitReference :: Branch )
684
692
. or_else ( || details. tag . clone ( ) . map ( GitReference :: Tag ) )
685
693
. or_else ( || details. rev . clone ( ) . map ( GitReference :: Rev ) )
0 commit comments