File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
src/StructuredLogger/BinaryLogger Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -724,7 +724,12 @@ private BuildEventArgs ReadProjectEvaluationFinishedEventArgs()
724724 if ( _fileFormatVersion >= 12 )
725725 {
726726 IEnumerable globalProperties = null ;
727- if ( ReadBoolean ( ) )
727+ // In newer versions, we store the global properties always, as it handles
728+ // null and empty within WriteProperties already.
729+ // This saves a single boolean, but mainly doesn't hide the difference between null and empty
730+ // during write->read roundtrip.
731+ if ( _fileFormatVersion >= BinaryLogger . ForwardCompatibilityMinimalVersion ||
732+ ReadBoolean ( ) )
728733 {
729734 globalProperties = ReadStringDictionary ( ) ;
730735 }
@@ -778,12 +783,12 @@ private BuildEventArgs ReadProjectStartedEventArgs()
778783
779784 if ( _fileFormatVersion > 6 )
780785 {
781- if ( _fileFormatVersion < BinaryLogger . ForwardCompatibilityMinimalVersion )
786+ // See ReadProjectEvaluationFinishedEventArgs for details on why we always store global properties in newer version.
787+ if ( _fileFormatVersion >= BinaryLogger . ForwardCompatibilityMinimalVersion ||
788+ ReadBoolean ( ) )
782789 {
783- // Throw away, but need to advance past it
784- ReadBoolean ( ) ;
790+ globalProperties = ReadStringDictionary ( ) ;
785791 }
786- globalProperties = ReadStringDictionary ( ) ;
787792 }
788793
789794 var propertyList = ReadPropertyList ( ) ;
You can’t perform that action at this time.
0 commit comments