The msBuild (and possibly all parsers) can not detect issues if the line are long. I have not been able to determine the exact breaking point but it is around 4000 characters on a line.

      When using nested lambdas in C++, it is not uncommon for very long error/warning messages from visual studio compiler.

      Below are two example outputs.

      This example is not detected (4635 characters)

      C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(1534,1): warning C4267: 'argument': conversion from 'size_t' to 'const int', possible loss of dataC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(660): note: see reference to function template instantiation 'int std::invoke<_Callable&,_Ty,>(LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>&,_Ty1 &&) noexcept(false) with [_Callable=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>, _Ty=size_t, _Ty1=size_t]' being compiledC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(822): note: see reference to function template instantiation '_Rx std::_Invoker_ret<_Rx,false>::_Call<_Callable&,_Ty>(_Fx,_Ty &&) noexcept(false) with [_Rx=size_t, _Callable=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>, _Ty=size_t, _Fx=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886> &]' being compiledC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(822): note: see reference to function template instantiation '_Rx std::_Invoker_ret<_Rx,false>::_Call<_Callable&,_Ty>(_Fx,_Ty &&) noexcept(false) with [_Rx=size_t, _Callable=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>, _Ty=size_t, _Fx=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886> &]' being compiledC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(821): note: while compiling class template member function '_Rx std::_Func_impl_no_alloc<LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>,_Rx,size_t>::_Do_call(size_t &&) with [_Rx=size_t]'C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(717): note: see reference to class template instantiation 'std::_Func_impl_no_alloc<LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>,_Ret,size_t> with [_Ret=size_t]' being compiledC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(911): note: see reference to variable template 'const bool _Is_large<std::_Func_impl_no_alloc<<lambda_186e8d783211d4718c75f80981d4d886>,unsigned __int64,unsigned __int64> >' being compiledC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(1042): note: see reference to function template instantiation 'void std::_Func_class<_Ret,size_t>::_Reset<LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>>(_Fx &&) with [_Ret=size_t, _Fx=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>]' being compiledC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(1042): note: see reference to function template instantiation 'void std::_Func_class<_Ret,size_t>::_Reset<LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>>(_Fx &&) with [_Ret=size_t, _Fx=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>]' being compiled..\symri\TriggerCompileWarning.cpp(53): note: see reference to function template instantiation 'std::function<size_t (size_t)>::function<LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>,0>(_Fx) with [_Fx=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>]' being compiled..\symri\TriggerCompileWarning.cpp(52): note: see reference to function template instantiation 'std::function<size_t (size_t)>::function<LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>,0>(_Fx) with [_Fx=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>]' being compiled
      

      This example is detected (3741 characters)

      C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(1534,67): warning C4244: 'argument': conversion from '_Ty1 with [_Ty1=double]' to 'const float', possible loss of dataC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(660): note: see reference to function template instantiation 'float std::invoke<_Callable&,_Ty,>(WarningInTraits::<lambda_dcbbac96137333a65019a656a76a5e99>&,_Ty1 &&) noexcept(false) with [_Callable=WarningInTraits::<lambda_dcbbac96137333a65019a656a76a5e99>, _Ty=double, _Ty1=double]' being compiledC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(822): note: see reference to function template instantiation '_Rx std::_Invoker_ret<_Rx,false>::_Call<_Callable&,_Ty>(_Fx,_Ty &&) noexcept(false) with [_Rx=double, _Callable=WarningInTraits::<lambda_dcbbac96137333a65019a656a76a5e99>, _Ty=double, _Fx=WarningInTraits::<lambda_dcbbac96137333a65019a656a76a5e99> &]' being compiledC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(822): note: see reference to function template instantiation '_Rx std::_Invoker_ret<_Rx,false>::_Call<_Callable&,_Ty>(_Fx,_Ty &&) noexcept(false) with [_Rx=double, _Callable=WarningInTraits::<lambda_dcbbac96137333a65019a656a76a5e99>, _Ty=double, _Fx=WarningInTraits::<lambda_dcbbac96137333a65019a656a76a5e99> &]' being compiledC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(821): note: while compiling class template member function '_Rx std::_Func_impl_no_alloc<WarningInTraits::<lambda_dcbbac96137333a65019a656a76a5e99>,_Rx,double>::_Do_call(double &&) with [_Rx=double]'C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(717): note: see reference to class template instantiation 'std::_Func_impl_no_alloc<WarningInTraits::<lambda_dcbbac96137333a65019a656a76a5e99>,_Ret,double> with [_Ret=double]' being compiledC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(911): note: see reference to variable template 'const bool _Is_large<std::_Func_impl_no_alloc<<lambda_dcbbac96137333a65019a656a76a5e99>,double,double> >' being compiledC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(1042): note: see reference to function template instantiation 'void std::_Func_class<_Ret,double>::_Reset<WarningInTraits::<lambda_dcbbac96137333a65019a656a76a5e99>>(_Fx &&) with [_Ret=double, _Fx=WarningInTraits::<lambda_dcbbac96137333a65019a656a76a5e99>]' being compiledC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(1042): note: see reference to function template instantiation 'void std::_Func_class<_Ret,double>::_Reset<WarningInTraits::<lambda_dcbbac96137333a65019a656a76a5e99>>(_Fx &&) with [_Ret=double, _Fx=WarningInTraits::<lambda_dcbbac96137333a65019a656a76a5e99>]' being compiled..\symri\TriggerCompileWarning.cpp(40): note: see reference to function template instantiation 'std::function<double (double)>::function<WarningInTraits::<lambda_dcbbac96137333a65019a656a76a5e99>,0>(_Fx) with [_Fx=WarningInTraits::<lambda_dcbbac96137333a65019a656a76a5e99>]' being compiled..\symri\TriggerCompileWarning.cpp(40): note: see reference to function template instantiation 'std::function<double (double)>::function<WarningInTraits::<lambda_dcbbac96137333a65019a656a76a5e99>,0>(_Fx) with [_Fx=WarningInTraits::<lambda_dcbbac96137333a65019a656a76a5e99>]' being compiled
       

      I tested to add the examples for the unit-test for the MS Build parser, and it gave with the same result (no match on first example). I'm assuming that some stream reader only buffers lines up to a certain length and then truncates them. I've also tested the regular expression for MS Build against the examples on regex101.com and in that case both examples matches against the regex. Hence my assumption of the lines being truncated in the plugin.

       

      Here is the example C++ code that generated the warning with visual studio compiler:

      #include <iostream>
      #include <stdexcept>
      #include <functional>
      
      static void WarningInTraits(){
          /**
           * Warning in Traits due to possible loss of data. */
          []( std::function<double( const double )> f ) {
              double d = 10.0;
              std::cout << f( d ) << std::endl;
          }( []( const float f ) { return f; } );
      }
      
      
      static void LongTraceWarningInTraits(){
          /** Nested lambdas to create very long error message.
           * See also WarningInTraits().
           * Jenkins might not be able to parse this, due to bug not parsing long lines. */
          []() {
              []( std::function<size_t( const size_t )> f ) {
                  size_t s = 10;
                  std::cout << f( s ) << std::endl;
              }( []( const int i ) { return i; } );
          }();
      }
      
      int main(){
          WarningInTraits();
          LongTraceWarningInTraits();
          return 0;
      }
      

          [JENKINS-68744] Warnings Next Generation can't parse long lines

          Ulli Hafner added a comment -

          Did you check with https://regex101.com if other regexp matcher would detect it?

          Ulli Hafner added a comment - Did you check with https://regex101.com if other regexp matcher would detect it?

          Per Böhlin added a comment - - edited

          drulli , I'm not sure I understand the question. regex101.com was able to match my examples with the regular expressions for the MS Build parser. So the problem was not the reg-pattern. I have not tested my examples against other parser's patterns.

          I've updated the description to hopefully clarify what I have tested.

          Thank you for the quick response.

          Per Böhlin added a comment - - edited drulli , I'm not sure I understand the question. regex101.com was able to match my examples with the regular expressions for the MS Build parser. So the problem was not the reg-pattern. I have not tested my examples against other parser's patterns. I've updated the description to hopefully clarify what I have tested. Thank you for the quick response.

          Ulli Hafner added a comment -

          Thanks! I am sorry, it seems that I missed the text in the middle of your description in the beginning.

          Ulli Hafner added a comment - Thanks! I am sorry, it seems that I missed the text in the middle of your description in the beginning.

          Jayanth added a comment - - edited

          I think this issue can provide more context to the behaviour : https://issues.jenkins.io/browse/JENKINS-55805

          Jayanth added a comment - - edited I think this issue can provide more context to the behaviour : https://issues.jenkins.io/browse/JENKINS-55805

          Ulli Hafner added a comment -

          Why is this related?

          Ulli Hafner added a comment - Why is this related?

          Arnab added a comment -

          Hello drulli I just did the debugging on this. Here are the findings - 

          First of all, the entire log is correctly loaded regardless of the length. BUT, the main issue is with the hard coded limit of 4000 characters which is checked in a function called "isLineInteresting" and if the length exceeds this limit, the pattern matching do not takes place. Reference - Jenkins-55085 (mentioned in LookAheadParses.java, line 39)

          I think the hard coded limit of 4000 character can cause issues like this one. So, maybe we could try to make the limit configurable?

          I'd like to hear your thoughts on this.

          Arnab added a comment - Hello drulli I just did the debugging on this. Here are the findings -  First of all, the entire log is correctly loaded regardless of the length. BUT, the main issue is with the hard coded limit of 4000 characters which is checked in a function called "isLineInteresting" and if the length exceeds this limit, the pattern matching do not takes place. Reference - Jenkins-55085 (mentioned in LookAheadParses.java, line 39) I think the hard coded limit of 4000 character can cause issues like this one. So, maybe we could try to make the limit configurable? I'd like to hear your thoughts on this.

          Arnab added a comment -

          Also another question why is there a need of this function - "
          preprocessLine(line);" at line 77 of "lookAheadParser.java" the implementation is empty and says -                               "// empty default implementation does nothing"
           
          So, I think this function is redundant and we can safely remove it.

          Arnab added a comment - Also another question why is there a need of this function - " preprocessLine(line);" at line 77 of "lookAheadParser.java" the implementation is empty and says -                               "// empty default implementation does nothing"   So, I think this function is redundant and we can safely remove it.

          Ulli Hafner added a comment -

          think the hard coded limit of 4000 character can cause issues like this one. So, maybe we could try to make the limit configurable?

          Yes, this is the problem here. We can either override the method for the MS Build parser (simple fix) or provide a user configurable option. Since this is the only issue that mentions such a problem and nobody voted for this issue yet I would recommend the quick fix.

          We still can make this configurable if required...

          Ulli Hafner added a comment - think the hard coded limit of 4000 character can cause issues like this one. So, maybe we could try to make the limit configurable? Yes, this is the problem here. We can either override the method for the MS Build parser (simple fix) or provide a user configurable option. Since this is the only issue that mentions such a problem and nobody voted for this issue yet I would recommend the quick fix. We still can make this configurable if required...

          Ulli Hafner added a comment -

          Also another question why is there a need of this function - "
          preprocessLine(line);" at line 77 of "lookAheadParser.java" the implementation is empty and says - "// empty default implementation does nothing"

          So, I think this function is redundant and we can safely remove it.

          Actually this template method is overwritten by some parsers so (Maven parser) we cannot remove it.

          Ulli Hafner added a comment - Also another question why is there a need of this function - " preprocessLine(line);" at line 77 of "lookAheadParser.java" the implementation is empty and says - "// empty default implementation does nothing" So, I think this function is redundant and we can safely remove it. Actually this template method is overwritten by some parsers so (Maven parser) we cannot remove it.

          Arnab added a comment - - edited

          Yup, that makes sense. Then what do you think is the best way to approach this?

          Arnab added a comment - - edited Yup, that makes sense. Then what do you think is the best way to approach this?

          Ulli Hafner added a comment -

          Write a test that has the log line from the description: it should fail. Override the method in the parser so that it does nothing, then the same test should be green. Should be simple...

          Ulli Hafner added a comment - Write a test that has the log line from the description: it should fail. Override the method in the parser so that it does nothing, then the same test should be green. Should be simple...

          Arnab added a comment - - edited

          Hello drulli I added the failing test like you said. After that I was trying to override the "parse" function (to do nothing) but it has a return type "Report". Same for the "isLineInteresting" which has boolean. So, I can't override that method similar to the "preprocessLine" method.

          Here is how the functions get called - 

          parse(...) // MSBuildParserTest.java

          parse(...) // AbstractParserTestjava.

          parse(...) // IssueParser.java

          parseReport(...) // LookAheadParser.java extends IssueParser.java

          parse(...) // LookAheadParser but private

           

          Should I try to override the "isLineInteresting" to return true for this case or am I doing something wrong?

           

          Arnab added a comment - - edited Hello drulli I added the failing test like you said. After that I was trying to override the "parse" function (to do nothing) but it has a return type "Report". Same for the "isLineInteresting" which has boolean. So, I can't override that method similar to the "preprocessLine" method. Here is how the functions get called -  parse(...) // MSBuildParserTest.java parse(...) // AbstractParserTestjava. parse(...) // IssueParser.java parseReport(...) // LookAheadParser.java extends IssueParser.java parse(...) // LookAheadParser but private   Should I try to override the "isLineInteresting" to return true for this case or am I doing something wrong?  

          Ulli Hafner added a comment -

          I don't follow. Why are you overriding parse? You simply need to override isLineInteresting for the MSBuildParser!

          Ulli Hafner added a comment - I don't follow. Why are you overriding parse ? You simply need to override isLineInteresting for the MSBuildParser!

          Arnab added a comment -

          Sorry! I misunderstood the implementation of parser initially and that's why I got confused b/w which one should I override. Thank You for the clarification!

          Arnab added a comment - Sorry! I misunderstood the implementation of parser initially and that's why I got confused b/w which one should I override. Thank You for the clarification!

          Arnab added a comment -

          Arnab added a comment - drulli Here is the PR - https://github.com/jenkinsci/analysis-model/pull/1147 Thank You

          Kalle Niemitalo added a comment - - edited

          Strange that it's all on the same line. I'd expect a line break before each occurrence of "C:\Program Files (x86)" or "..\symri", like this:

          C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(1534,1): warning C4267: 'argument': conversion from 'size_t' to 'const int', possible loss of data
          C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(660): note: see reference to function template instantiation 'int std::invoke<_Callable&,_Ty,>(LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>&,_Ty1 &&) noexcept(false) with [_Callable=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>, _Ty=size_t, _Ty1=size_t]' being compiled
          C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(822): note: see reference to function template instantiation '_Rx std::_Invoker_ret<_Rx,false>::_Call<_Callable&,_Ty>(_Fx,_Ty &&) noexcept(false) with [_Rx=size_t, _Callable=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>, _Ty=size_t, _Fx=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886> &]' being compiled
          C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(822): note: see reference to function template instantiation '_Rx std::_Invoker_ret<_Rx,false>::_Call<_Callable&,_Ty>(_Fx,_Ty &&) noexcept(false) with [_Rx=size_t, _Callable=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>, _Ty=size_t, _Fx=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886> &]' being compiled
          C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(821): note: while compiling class template member function '_Rx std::_Func_impl_no_alloc<LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>,_Rx,size_t>::_Do_call(size_t &&) with [_Rx=size_t]'
          C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(717): note: see reference to class template instantiation 'std::_Func_impl_no_alloc<LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>,_Ret,size_t> with [_Ret=size_t]' being compiled
          C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(911): note: see reference to variable template 'const bool _Is_large<std::_Func_impl_no_alloc<<lambda_186e8d783211d4718c75f80981d4d886>,unsigned __int64,unsigned __int64> >' being compiled
          C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(1042): note: see reference to function template instantiation 'void std::_Func_class<_Ret,size_t>::_Reset<LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>>(_Fx &&) with [_Ret=size_t, _Fx=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>]' being compiled
          C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(1042): note: see reference to function template instantiation 'void std::_Func_class<_Ret,size_t>::_Reset<LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>>(_Fx &&) with [_Ret=size_t, _Fx=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>]' being compiled
          ..\symri\TriggerCompileWarning.cpp(53): note: see reference to function template instantiation 'std::function<size_t (size_t)>::function<LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>,0>(_Fx) with [_Fx=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>]' being compiled
          ..\symri\TriggerCompileWarning.cpp(52): note: see reference to function template instantiation 'std::function<size_t (size_t)>::function<LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>,0>(_Fx) with [_Fx=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>]' being compiled
          

          Is there a specific C++ compiler option that causes the lines to be joined?

          Kalle Niemitalo added a comment - - edited Strange that it's all on the same line. I'd expect a line break before each occurrence of "C:\Program Files (x86)" or "..\symri", like this: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(1534,1): warning C4267: 'argument': conversion from 'size_t' to 'const int', possible loss of data C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(660): note: see reference to function template instantiation 'int std::invoke<_Callable&,_Ty,>(LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>&,_Ty1 &&) noexcept(false) with [_Callable=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>, _Ty=size_t, _Ty1=size_t]' being compiled C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(822): note: see reference to function template instantiation '_Rx std::_Invoker_ret<_Rx,false>::_Call<_Callable&,_Ty>(_Fx,_Ty &&) noexcept(false) with [_Rx=size_t, _Callable=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>, _Ty=size_t, _Fx=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886> &]' being compiled C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(822): note: see reference to function template instantiation '_Rx std::_Invoker_ret<_Rx,false>::_Call<_Callable&,_Ty>(_Fx,_Ty &&) noexcept(false) with [_Rx=size_t, _Callable=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>, _Ty=size_t, _Fx=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886> &]' being compiled C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(821): note: while compiling class template member function '_Rx std::_Func_impl_no_alloc<LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>,_Rx,size_t>::_Do_call(size_t &&) with [_Rx=size_t]' C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(717): note: see reference to class template instantiation 'std::_Func_impl_no_alloc<LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>,_Ret,size_t> with [_Ret=size_t]' being compiled C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(911): note: see reference to variable template 'const bool _Is_large<std::_Func_impl_no_alloc<<lambda_186e8d783211d4718c75f80981d4d886>,unsigned __int64,unsigned __int64> >' being compiled C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(1042): note: see reference to function template instantiation 'void std::_Func_class<_Ret,size_t>::_Reset<LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>>(_Fx &&) with [_Ret=size_t, _Fx=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>]' being compiled C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\functional(1042): note: see reference to function template instantiation 'void std::_Func_class<_Ret,size_t>::_Reset<LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>>(_Fx &&) with [_Ret=size_t, _Fx=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>]' being compiled ..\symri\TriggerCompileWarning.cpp(53): note: see reference to function template instantiation 'std::function<size_t (size_t)>::function<LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>,0>(_Fx) with [_Fx=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>]' being compiled ..\symri\TriggerCompileWarning.cpp(52): note: see reference to function template instantiation 'std::function<size_t (size_t)>::function<LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>,0>(_Fx) with [_Fx=LongTraceWarningInTraits::<lambda_1928bcd9221ebe214799fcab6696dc05>::()::<lambda_186e8d783211d4718c75f80981d4d886>]' being compiled Is there a specific C++ compiler option that causes the lines to be joined?

          Arnab added a comment - - edited

          I'm not sure about that. Actually, I didn't even noticed it until you pointed out. I though it was one long error

          Do I need to change the format of the log file in the PR?

          Arnab added a comment - - edited I'm not sure about that. Actually, I didn't even noticed it until you pointed out. I though it was one long error Do I need to change the format of the log file in the PR?

          Kalle Niemitalo added a comment -

          When I try it, I get even more line breaks, like this:

          C:\Program Files\Microsoft Visual Studio\2022\Professional2\VC\Tools\MSVC\14.29.30133\include\functional(822): message : see reference to function template instantiation '_Rx std::_Invoker_ret<_Rx,false>::_Call<_Callable&,_Ty>(_Fx,_Ty &&) noexcept(false)' being compiled [C:\[REDACTED]\symri\symri.vcxproj]
                    with
                    [
                        _Rx=size_t,
                        _Callable=LongTraceWarningInTraits::<lambda_9b7538667778dce296a4ef715c9ce15f>::()::<lambda_cd53c7ea210e2428635c907e0918e474>,
                        _Ty=size_t,
                        _Fx=LongTraceWarningInTraits::<lambda_9b7538667778dce296a4ef715c9ce15f>::()::<lambda_cd53c7ea210e2428635c907e0918e474> &
                    ]
          

          AFAIK, the reference to the vcxproj file is added by MSBuild, not by the C++ compiler. I didn't see a similar vcxproj reference in your output, though. Are you using CMake rather than MSBuild?

          Kalle Niemitalo added a comment - When I try it, I get even more line breaks, like this: C:\Program Files\Microsoft Visual Studio\2022\Professional2\VC\Tools\MSVC\14.29.30133\include\functional(822): message : see reference to function template instantiation '_Rx std::_Invoker_ret<_Rx,false>::_Call<_Callable&,_Ty>(_Fx,_Ty &&) noexcept(false)' being compiled [C:\[REDACTED]\symri\symri.vcxproj] with [ _Rx=size_t, _Callable=LongTraceWarningInTraits::<lambda_9b7538667778dce296a4ef715c9ce15f>::()::<lambda_cd53c7ea210e2428635c907e0918e474>, _Ty=size_t, _Fx=LongTraceWarningInTraits::<lambda_9b7538667778dce296a4ef715c9ce15f>::()::<lambda_cd53c7ea210e2428635c907e0918e474> & ] AFAIK, the reference to the vcxproj file is added by MSBuild, not by the C++ compiler. I didn't see a similar vcxproj reference in your output, though. Are you using CMake rather than MSBuild?

          Kalle Niemitalo added a comment -

          Do I need to change the format of the log file in the PR?

          I think the important part is to find out what is making the lines so long, when they are not that long originally. Some kind of mistake in how Jenkins reads the output from the compiler?

          Do you have the Warnings plugin parsing the output straight from the build console, or do you redirect the compiler output to a file and make the plugin parse the file?

          Kalle Niemitalo added a comment - Do I need to change the format of the log file in the PR? I think the important part is to find out what is making the lines so long, when they are not that long originally. Some kind of mistake in how Jenkins reads the output from the compiler? Do you have the Warnings plugin parsing the output straight from the build console, or do you redirect the compiler output to a file and make the plugin parse the file?

          Arnab added a comment -

          Hello kon actually I followed the second option by copy/pasting the logs from the description to a .txt file and parsing it later. I didn't directly used any compiler to generate the logs, just utilized the logs mentioned in the description by the issue poster.

          Arnab added a comment - Hello kon actually I followed the second option by copy/pasting the logs from the description to a .txt file and parsing it later. I didn't directly used any compiler to generate the logs, just utilized the logs mentioned in the description by the issue poster.

            code_arnab Arnab
            per_bohlin Per Böhlin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: