File tree Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -686,6 +686,8 @@ impl<'cfg> Workspace<'cfg> {
686686 } ) ?;
687687 }
688688
689+ self . find_path_deps ( & root_manifest_path, & root_manifest_path, false ) ?;
690+
689691 if let Some ( default) = default_members_paths {
690692 for path in default {
691693 let normalized_path = paths:: normalize_path ( & path) ;
@@ -716,7 +718,7 @@ impl<'cfg> Workspace<'cfg> {
716718 self . default_members . push ( self . current_manifest . clone ( ) )
717719 }
718720
719- self . find_path_deps ( & root_manifest_path , & root_manifest_path , false )
721+ Ok ( ( ) )
720722 }
721723
722724 fn find_path_deps (
Original file line number Diff line number Diff line change @@ -119,6 +119,35 @@ fn non_virtual_default_members_build_other_member() {
119119 . run ( ) ;
120120}
121121
122+ #[ cargo_test]
123+ fn non_virtual_default_members_build_root_project ( ) {
124+ let p = project ( )
125+ . file (
126+ "Cargo.toml" ,
127+ r#"
128+ [project]
129+ name = "foo"
130+ version = "0.1.0"
131+ authors = []
132+
133+ [workspace]
134+ members = ["bar"]
135+ default-members = ["."]
136+ "# ,
137+ )
138+ . file ( "src/main.rs" , "fn main() {}" )
139+ . file ( "bar/Cargo.toml" , & basic_manifest ( "bar" , "0.1.0" ) )
140+ . file ( "bar/src/lib.rs" , "pub fn bar() {}" )
141+ . build ( ) ;
142+
143+ p. cargo ( "build" )
144+ . with_stderr (
145+ "[..] Compiling foo v0.1.0 ([..])\n \
146+ [..] Finished dev [unoptimized + debuginfo] target(s) in [..]\n ",
147+ )
148+ . run ( ) ;
149+ }
150+
122151#[ cargo_test]
123152fn inferred_root ( ) {
124153 let p = project ( )
You can’t perform that action at this time.
0 commit comments