@@ -373,7 +373,7 @@ private WurstCompilerJassImpl getCompiler(WurstGui gui) {
373373 }
374374
375375 private void updateModel (CompilationUnit cu , WurstGui gui ) {
376- WLogger .info ("update model with " + cu .getCuInfo ().getFile ());
376+ WLogger .trace ("update model with " + cu .getCuInfo ().getFile ());
377377 parseErrors .put (wFile (cu ), new ArrayList <>(gui .getErrorsAndWarnings ()));
378378
379379 WurstModel model2 = model ;
@@ -518,23 +518,26 @@ private CompilationUnit replaceCompilationUnit(WFile filename, String contents,
518518 }
519519 if (fileHashcodes .containsKey (filename )) {
520520 int oldHash = fileHashcodes .get (filename );
521- WLogger .info ("oldHash = " + oldHash + " == " + contents .hashCode ());
522521 if (oldHash == contents .hashCode ()) {
523522 // no change
524- WLogger .info ("CU " + filename + " was unchanged." );
523+ WLogger .trace ("CU " + filename + " was unchanged." );
525524 return getCompilationUnit (filename );
525+ } else {
526+ WLogger .info ("CU changed. oldHash = " + oldHash + " == " + contents .hashCode ());
526527 }
527528 }
528529
529- WLogger .info ("replace CU " + filename );
530+ WLogger .trace ("replace CU " + filename );
530531 WurstGui gui = new WurstGuiLogger ();
531532 WurstCompilerJassImpl c = getCompiler (gui );
532533 CompilationUnit cu = c .parse (filename .toString (), new StringReader (contents ));
533534 cu .getCuInfo ().setFile (filename .toString ());
534535 updateModel (cu , gui );
535536 fileHashcodes .put (filename , contents .hashCode ());
536537 if (reportErrors ) {
537- WLogger .info ("found " + gui .getErrorCount () + " errors in file " + filename );
538+ if (gui .getErrorCount () > 0 ) {
539+ WLogger .info ("found " + gui .getErrorCount () + " errors in file " + filename );
540+ }
538541 reportErrors ("sync cu " + filename , filename , gui .getErrorsAndWarnings ());
539542 }
540543 return cu ;
0 commit comments