@@ -53,8 +53,8 @@ impl CfgOverrides {
53
53
/// the current workspace.
54
54
#[ derive( Debug , Clone , Eq , PartialEq , Hash ) ]
55
55
pub struct PackageRoot {
56
- /// Is a member of the current workspace
57
- pub is_member : bool ,
56
+ /// Is from the local filesystem and may be edited
57
+ pub is_local : bool ,
58
58
pub include : Vec < AbsPathBuf > ,
59
59
pub exclude : Vec < AbsPathBuf > ,
60
60
}
@@ -268,15 +268,15 @@ impl ProjectWorkspace {
268
268
ProjectWorkspace :: Json { project, sysroot, rustc_cfg : _ } => project
269
269
. crates ( )
270
270
. map ( |( _, krate) | PackageRoot {
271
- is_member : krate. is_workspace_member ,
271
+ is_local : krate. is_workspace_member ,
272
272
include : krate. include . clone ( ) ,
273
273
exclude : krate. exclude . clone ( ) ,
274
274
} )
275
275
. collect :: < FxHashSet < _ > > ( )
276
276
. into_iter ( )
277
277
. chain ( sysroot. as_ref ( ) . into_iter ( ) . flat_map ( |sysroot| {
278
278
sysroot. crates ( ) . map ( move |krate| PackageRoot {
279
- is_member : false ,
279
+ is_local : false ,
280
280
include : vec ! [ sysroot[ krate] . root. parent( ) . to_path_buf( ) ] ,
281
281
exclude : Vec :: new ( ) ,
282
282
} )
@@ -293,7 +293,7 @@ impl ProjectWorkspace {
293
293
cargo
294
294
. packages ( )
295
295
. map ( |pkg| {
296
- let is_member = cargo[ pkg] . is_member ;
296
+ let is_local = cargo[ pkg] . is_local ;
297
297
let pkg_root = cargo[ pkg] . manifest . parent ( ) . to_path_buf ( ) ;
298
298
299
299
let mut include = vec ! [ pkg_root. clone( ) ] ;
@@ -319,23 +319,23 @@ impl ProjectWorkspace {
319
319
include. extend ( extra_targets) ;
320
320
321
321
let mut exclude = vec ! [ pkg_root. join( ".git" ) ] ;
322
- if is_member {
322
+ if is_local {
323
323
exclude. push ( pkg_root. join ( "target" ) ) ;
324
324
} else {
325
325
exclude. push ( pkg_root. join ( "tests" ) ) ;
326
326
exclude. push ( pkg_root. join ( "examples" ) ) ;
327
327
exclude. push ( pkg_root. join ( "benches" ) ) ;
328
328
}
329
- PackageRoot { is_member , include, exclude }
329
+ PackageRoot { is_local , include, exclude }
330
330
} )
331
331
. chain ( sysroot. into_iter ( ) . map ( |sysroot| PackageRoot {
332
- is_member : false ,
332
+ is_local : false ,
333
333
include : vec ! [ sysroot. root( ) . to_path_buf( ) ] ,
334
334
exclude : Vec :: new ( ) ,
335
335
} ) )
336
336
. chain ( rustc. into_iter ( ) . flat_map ( |rustc| {
337
337
rustc. packages ( ) . map ( move |krate| PackageRoot {
338
- is_member : false ,
338
+ is_local : false ,
339
339
include : vec ! [ rustc[ krate] . manifest. parent( ) . to_path_buf( ) ] ,
340
340
exclude : Vec :: new ( ) ,
341
341
} )
@@ -345,12 +345,12 @@ impl ProjectWorkspace {
345
345
ProjectWorkspace :: DetachedFiles { files, sysroot, .. } => files
346
346
. into_iter ( )
347
347
. map ( |detached_file| PackageRoot {
348
- is_member : true ,
348
+ is_local : true ,
349
349
include : vec ! [ detached_file. clone( ) ] ,
350
350
exclude : Vec :: new ( ) ,
351
351
} )
352
352
. chain ( sysroot. crates ( ) . map ( |krate| PackageRoot {
353
- is_member : false ,
353
+ is_local : false ,
354
354
include : vec ! [ sysroot[ krate] . root. parent( ) . to_path_buf( ) ] ,
355
355
exclude : Vec :: new ( ) ,
356
356
} ) )
0 commit comments