@@ -8,12 +8,13 @@ use serde::{Deserialize, Serialize};
8
8
9
9
use crate :: config:: { AliasRule , CrateId , GenBinaries } ;
10
10
use crate :: metadata:: {
11
- CrateAnnotation , Dependency , PairedExtras , SourceAnnotation , TreeResolverMetadata ,
11
+ CrateAnnotation , Dependency , MetadataAnnotation , PairedExtras , SourceAnnotation ,
12
+ TreeResolverMetadata ,
12
13
} ;
13
14
use crate :: select:: Select ;
14
15
use crate :: splicing:: WorkspaceMetadata ;
15
16
use crate :: utils:: sanitize_module_name;
16
- use crate :: utils:: starlark:: { Glob , GlobOrLabels , Label , SelectList } ;
17
+ use crate :: utils:: starlark:: { Glob , GlobOrLabels , Label , Repository } ;
17
18
18
19
#[ derive( Debug , Clone , PartialEq , Eq , PartialOrd , Ord , Serialize , Deserialize ) ]
19
20
pub struct CrateDependency {
@@ -874,7 +875,7 @@ fn get_attributes(
874
875
TargetAttributes {
875
876
crate_name,
876
877
crate_root,
877
- srcs : Glob :: new_rust_srcs ( ) . into ( ) ,
878
+ srcs : Glob :: new_rust_srcs ( true ) . into ( ) ,
878
879
compile_data : None ,
879
880
}
880
881
} else {
@@ -890,14 +891,14 @@ fn get_attributes(
890
891
println ! (
891
892
"'crate_root', 'srcs', 'compile_data', and (if necessary) 'build_script_crate_root'"
892
893
) ;
893
- let srcs = GlobOrLabels :: Labels ( vec ! [ Label {
894
- repository: None ,
895
- package: Some ( pkg. clone( ) ) ,
894
+ let srcs = GlobOrLabels :: Labels ( vec ! [ Label :: Absolute {
895
+ repository: Repository :: Local ,
896
+ package: pkg. clone( ) ,
896
897
target: "srcs" . to_string( ) ,
897
898
} ] ) ;
898
- let compile_data = Some ( GlobOrLabels :: Labels ( vec ! [ Label {
899
- repository: None ,
900
- package: Some ( pkg. clone( ) ) ,
899
+ let compile_data = Some ( GlobOrLabels :: Labels ( vec ! [ Label :: Absolute {
900
+ repository: Repository :: Local ,
901
+ package: pkg. clone( ) ,
901
902
target: "compile_data" . to_string( ) ,
902
903
} ] ) ) ;
903
904
@@ -1159,7 +1160,7 @@ mod test {
1159
1160
BTreeSet :: from( [ Rule :: Library ( TargetAttributes {
1160
1161
crate_name: "sysinfo" . to_owned( ) ,
1161
1162
crate_root: Some ( "src/lib.rs" . to_owned( ) ) ,
1162
- srcs: Glob :: new_rust_srcs( !are_sources_present) ,
1163
+ srcs: Glob :: new_rust_srcs( !are_sources_present) . into ( ) ,
1163
1164
compile_data: None ,
1164
1165
} ) ] ) ,
1165
1166
) ;
@@ -1186,7 +1187,7 @@ mod test {
1186
1187
1187
1188
let context = CrateContext :: new (
1188
1189
crate_annotation,
1189
- & annotations. metadata . packages ,
1190
+ & annotations. metadata ,
1190
1191
& annotations. lockfile . crates ,
1191
1192
& annotations. pairred_extras ,
1192
1193
& annotations. metadata . workspace_metadata . tree_metadata ,
@@ -1318,7 +1319,7 @@ mod test {
1318
1319
1319
1320
let context = CrateContext :: new (
1320
1321
crate_annotation,
1321
- & annotations. metadata . packages ,
1322
+ & annotations. metadata ,
1322
1323
& annotations. lockfile . crates ,
1323
1324
& annotations. pairred_extras ,
1324
1325
& annotations. metadata . workspace_metadata . tree_metadata ,
0 commit comments