@@ -14,6 +14,7 @@ export default class BuildHelper extends WorkerHelper {
1414 fromCache = 0 ;
1515 built = 0 ;
1616 missingProjects = [ ] ;
17+ hashMismatchProjects = [ ] ;
1718
1819 constructor ( command ) {
1920 super ( command ) ;
@@ -121,13 +122,15 @@ export default class BuildHelper extends WorkerHelper {
121122 for ( const output of outputs ) {
122123 // const outputPath = path.join(ROOT_PATH, root, output);
123124 Logger . log ( 3 , 'Recovering from cache' , buildProject , 'with hash => ' , hash ) ;
125+ const startTime = process . hrtime ( ) ;
124126 const recoverResponse = await this . anotherJob ( hash , root , output , script , this . compareHash , this . logAffected ) ;
125127 if ( recoverResponse instanceof Error ) {
126128 throw new Error ( recoverResponse ) ;
127129 }
128130 if ( ! recoverResponse ) {
129131 // TODO: will remove in for loop sorry for shitty code anyone who sees it :((
130132 await this . execute ( buildPath , script , hash , root , outputs , buildProject ) ;
133+ this . hashMismatchProjects . push ( { buildProject, time : process . hrtime ( startTime ) } ) ;
131134 this . built ++
132135 } else {
133136 this . fromCache ++
@@ -162,6 +165,7 @@ export default class BuildHelper extends WorkerHelper {
162165 Logger . log ( 2 , `${ this . fromCache } projects used from cache,` ) ;
163166 Logger . log ( 2 , `${ this . built } projects used without cache.` ) ;
164167 Logger . log ( 2 , `Cache is missing for following projects => ${ formatMissingProjects ( this . missingProjects ) } ` ) ;
168+ Logger . log ( 2 , `Hashes mismatched for following projects => ${ formatMissingProjects ( this . hashMismatchProjects ) } ` ) ;
165169 Logger . log ( 2 , `Total process took ${ formatTimeDiff ( process . hrtime ( this . startTime ) ) } .` ) ;
166170 if ( this . debug && process . env . ZENITH_DEBUG_ID ) {
167171 this . cacher . updateDebugFile ( Hasher . getDebugJSON ( ) , this . command ) ;
0 commit comments