@@ -69,17 +69,31 @@ impl Project {
6969
7070 // Note: Add extra ignore patterns to `ignore` local config requires restarting daemon.
7171 project. ignore_patterns . extend ( project. xbase . ignore . clone ( ) ) ;
72- project
73- . ignore_patterns
74- . extend ( DEFAULT_IGNORE_PATTERN . clone ( ) . into_iter ( ) ) ;
72+ project. ignore_patterns . extend ( vec ! [
73+ "**/.git/**" . into( ) ,
74+ "**/*.xcodeproj/**" . into( ) ,
75+ "**/.*" . into( ) ,
76+ "**/build/**" . into( ) ,
77+ "**/buildServer.json" . into( ) ,
78+ ] ) ;
7579
7680 Ok ( project)
7781 }
7882
7983 pub async fn update ( & mut self ) -> Result < ( ) > {
80- let ignore_patterns = self . ignore_patterns . clone ( ) ;
81- * self = Self :: new ( & self . root ) . await ?;
82- self . ignore_patterns = ignore_patterns;
84+ let Self { root, clients, .. } = self ;
85+ let ( clients, root) = ( clients. clone ( ) , root. clone ( ) ) ;
86+
87+ * self = Self :: new ( & root) . await ?;
88+
89+ self . root = root;
90+ self . clients = clients;
91+ tracing:: info!(
92+ "Updated '{}' internal state. path: {:?}" ,
93+ self . name,
94+ self . root
95+ ) ;
96+
8397 Ok ( ( ) )
8498 }
8599
@@ -106,13 +120,3 @@ impl Project {
106120 }
107121 }
108122}
109- #[ cfg( feature = "daemon" ) ]
110- lazy_static:: lazy_static! {
111- static ref DEFAULT_IGNORE_PATTERN : Vec <String > = vec![
112- "**/.git/**" . into( ) ,
113- "**/*.xcodeproj/**" . into( ) ,
114- "**/.*" . into( ) ,
115- "**/build/**" . into( ) ,
116- "**/buildServer.json" . into( ) ,
117- ] ;
118- }
0 commit comments