@@ -1333,10 +1333,14 @@ impl ScheduleGraph {
1333
1333
// methods for reporting errors
1334
1334
impl ScheduleGraph {
1335
1335
fn get_node_name ( & self , id : & NodeId ) -> String {
1336
- match id {
1336
+ let mut name = match id {
1337
1337
NodeId :: System ( _) => self . systems [ id. index ( ) ] . get ( ) . unwrap ( ) . name ( ) . to_string ( ) ,
1338
1338
NodeId :: Set ( _) => self . system_sets [ id. index ( ) ] . name ( ) ,
1339
+ } ;
1340
+ if self . settings . use_shortnames {
1341
+ name = bevy_utils:: get_short_name ( & name) ;
1339
1342
}
1343
+ name
1340
1344
}
1341
1345
1342
1346
fn get_node_kind ( id : & NodeId ) -> & ' static str {
@@ -1519,8 +1523,15 @@ pub enum LogLevel {
1519
1523
/// Specifies miscellaneous settings for schedule construction.
1520
1524
#[ derive( Clone , Debug ) ]
1521
1525
pub struct ScheduleBuildSettings {
1522
- ambiguity_detection : LogLevel ,
1523
- hierarchy_detection : LogLevel ,
1526
+ /// Determines whether the presence of ambiguities (systems with conflicting access but indeterminate order)
1527
+ /// is only logged or also results in an [`Ambiguity`](ScheduleBuildError::Ambiguity) error.
1528
+ pub ambiguity_detection : LogLevel ,
1529
+ /// Determines whether the presence of redundant edges in the hierarchy of system sets is only
1530
+ /// logged or also results in a [`HierarchyRedundancy`](ScheduleBuildError::HierarchyRedundancy)
1531
+ /// error.
1532
+ pub hierarchy_detection : LogLevel ,
1533
+ /// If set to true, node names will be shortened instead of the fully qualified type path.
1534
+ pub use_shortnames : bool ,
1524
1535
}
1525
1536
1526
1537
impl Default for ScheduleBuildSettings {
@@ -1534,21 +1545,7 @@ impl ScheduleBuildSettings {
1534
1545
Self {
1535
1546
ambiguity_detection : LogLevel :: Ignore ,
1536
1547
hierarchy_detection : LogLevel :: Warn ,
1548
+ use_shortnames : false ,
1537
1549
}
1538
1550
}
1539
-
1540
- /// Determines whether the presence of ambiguities (systems with conflicting access but indeterminate order)
1541
- /// is only logged or also results in an [`Ambiguity`](ScheduleBuildError::Ambiguity) error.
1542
- pub fn with_ambiguity_detection ( mut self , level : LogLevel ) -> Self {
1543
- self . ambiguity_detection = level;
1544
- self
1545
- }
1546
-
1547
- /// Determines whether the presence of redundant edges in the hierarchy of system sets is only
1548
- /// logged or also results in a [`HierarchyRedundancy`](ScheduleBuildError::HierarchyRedundancy)
1549
- /// error.
1550
- pub fn with_hierarchy_detection ( mut self , level : LogLevel ) -> Self {
1551
- self . hierarchy_detection = level;
1552
- self
1553
- }
1554
1551
}
0 commit comments