Forum > Suggestions
compiler messages suggestion/feature request
440bx:
Hello,
I normally get hundreds upon hundreds of compiler messages when compiling a project.
There are so many messages that it becomes impractical to review them.
I'd like Lazarus to sort the messages by type, that is, group all the "hints" together, "Notes" together, "Warnings" together. and within each group sort by line number (that can be accomplished simply by aligning the messages then sorting the text starting at the alignment column (very simple sort.)
Also, the compiler stuff that is at the top would be nice to have at the bottom. Just FYI, I had to delete a good number of messages because with all the messages the post exceeds the maximum number of characters.
Comments welcome.
Here is the output of what I'd like to see from Lazarus:
--- Code: Text [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Free Pascal Compiler version 3.2.2-r0d122c49 [2024/03/17] for x86_64Copyright (c) 1993-2021 by Florian Klaempfl and others(1021) 17 warning(s) issued(3104) Compiling ZydisInfoG.lpr(3104) Compiling ErrorHandler.pas(3104) Compiling winapi.pas(1002) Target OS: Win64 for x64(1022) 155 hint(s) issued(3104) Compiling winmessages.pas(3104) Compiling Zydis.pas(3104) Compiling Resource.pas(9015) Linking H:\Dev\ZyDis\ZydisInfo\ZydisInfoG\ZydisInfoG.x64.exe(1008) 77940 lines compiled, 1.3 sec, 109728 bytes code, 5172 bytes data(1023) 76 note(s) issued <filename> Hint: (4055) Conversion between ordinals and pointers is not portable<filename> Hint: (4055) Conversion between ordinals and pointers is not portable<filename> Hint: (4055) Conversion between ordinals and pointers is not portable<filename> Hint: (4055) Conversion between ordinals and pointers is not portable<filename> Hint: (4055) Conversion between ordinals and pointers is not portable<filename> Hint: (5024) Parameter "InIID" not used<filename> Hint: (5024) Parameter "InKeyState" not used<filename> Hint: (5024) Parameter "InParamL" not used<filename> Hint: (5024) Parameter "OutObj" not used<filename> Hint: (5028) Local absolutevar "AccessedFlagsMask" is not used<filename> Hint: (5028) Local absolutevar "Address" is not used<filename> Hint: (5028) Local absolutevar "AlignTo" is not used<filename> Hint: (5028) Local absolutevar "Dc" is not used<filename> Hint: (5028) Local absolutevar "Decoder" is not used<filename> Hint: (5028) Local absolutevar "FlagIdx" is not used<filename> Hint: (5028) Local absolutevar "FlagsSectionMetrics" is not used<filename> Hint: (5028) Local absolutevar "Font" is not used<filename> Hint: (5028) Local absolutevar "FormatterStyle" is not used<filename> Hint: (5028) Local absolutevar "HeadingId" is not used<filename> Hint: (5028) Local absolutevar "HeadingLine" is not used<filename> Hint: (5028) Local absolutevar "Instruction" is not used<filename> Hint: (5028) Local absolutevar "Instruction" is not used<filename> Hint: (5028) Local absolutevar "InstructionBytes" is not used<filename> Hint: (5028) Local absolutevar "InstructionBytesDistances" is not used<filename> Hint: (5028) Local absolutevar "InstructionCharsMetrics" is not used<filename> Hint: (5028) Local absolutevar "InstructionIndexSequential" is not used<filename> Hint: (5028) Local absolutevar "InstructionLine" is not used<filename> Hint: (5028) Local absolutevar "InstructionsTbl" is not used<filename> Hint: (5028) Local absolutevar "InstructionsTbl" is not used<filename> Hint: (5028) Local absolutevar "InstructionsUniqueIndex" is not used<filename> Hint: (5028) Local absolutevar "InstructionsUniqueIndexCount" is not used<filename> Hint: (5028) Local absolutevar "ModuleAddress" is not used<filename> Hint: (5028) Local absolutevar "NtHeadersAddress32" is not used<filename> Hint: (5028) Local absolutevar "Operands" is not used<filename> Hint: (5028) Local absolutevar "OperandsSectionMetrics" is not used<filename> Hint: (5028) Local absolutevar "OutputPoint" is not used<filename> Hint: (5028) Local absolutevar "OutputSegmentLabels" is not used<filename> Hint: (5028) Local absolutevar "PaintResources" is not used<filename> Hint: (5028) Local absolutevar "PaintedLinesCount" is not used<filename> Hint: (5028) Local absolutevar "PaintedLinesCount" is not used<filename> Hint: (5028) Local absolutevar "PaintedLinesCount" is not used<filename> Hint: (5028) Local absolutevar "PaintedLinesCount" is not used<filename> Hint: (5028) Local absolutevar "PeData" is not used<filename> Hint: (5028) Local absolutevar "PeData" is not used<filename> Hint: (5028) Local absolutevar "PeData" is not used<filename> Hint: (5028) Local absolutevar "PeData" is not used<filename> Hint: (5028) Local absolutevar "ProgramData" is not used<filename> Hint: (5028) Local absolutevar "ProgramData" is not used<filename> Hint: (5028) Local absolutevar "ProgramData" is not used<filename> Hint: (5028) Local absolutevar "ProgramData" is not used<filename> Hint: (5028) Local absolutevar "RuntimeFunctions" is not used<filename> Hint: (5028) Local absolutevar "RuntimeFunctionsTable" is not used<filename> Hint: (5028) Local absolutevar "RuntimeFunctionsTableCount" is not used<filename> Hint: (5028) Local absolutevar "SegmentName" is not used<filename> Hint: (5028) Local absolutevar "SegmentOutputPoint" is not used<filename> Hint: (5028) Local absolutevar "Source" is not used<filename> Hint: (5028) Local absolutevar "SourceTable" is not used<filename> Hint: (5028) Local absolutevar "SourceTable" is not used<filename> Hint: (5028) Local absolutevar "SourceTable" is not used<filename> Hint: (5028) Local absolutevar "Token" is not used<filename> Hint: (5028) Local absolutevar "WM_MOUSEWHEEL_PARAM_L" is not used<filename> Hint: (5028) Local absolutevar "WindowClass" is not used<filename> Hint: (5028) Local absolutevar "Wnd" is not used<filename> Hint: (5028) Local absolutevar "X" is not used<filename> Hint: (5028) Local absolutevar "ZydisInfo" is not used<filename> Hint: (5028) Local absolutevar "dc" is not used<filename> Hint: (5028) Local absolutevar "dc" is not used<filename> Hint: (5028) Local absolutevar "dc" is not used<filename> Hint: (5028) Local absolutevar "dc" is not used<filename> Hint: (5028) Local absolutevar "dc" is not used<filename> Hint: (5028) Local absolutevar "dc" is not used<filename> Hint: (5028) Local absolutevar "dc" is not used<filename> Hint: (5028) Local const "COLOR_TYPECAST" is not used<filename> Hint: (5028) Local const "LABEL_INTEL_ABSOLUTE" is not used<filename> Hint: (5028) Local const "LABEL_INTEL_INVARIANT" is not used<filename> Hint: (5028) Local const "LABEL_INTEL_RELATIVE" is not used<filename> Hint: (5028) Local const "LABEL_UNUSED_ACCEPTS_REPE" is not used<filename> Hint: (5028) Local const "LABEL_UNUSED_ACCEPTS_REPNE" is not used<filename> Hint: (5028) Local const "LABEL_UNUSED_HAS_REPE" is not used<filename> Hint: (5028) Local const "LABEL_UNUSED_HAS_REPNE" is not used<filename> Hint: (5028) Local const "SUB_ESP_NUMBER" is not used<filename> Hint: (5028) Local const "color_aqua_bright4" is not used<filename> Hint: (5028) Local const "color_pink_bright5" is not used<filename> Hint: (5028) Local const "color_pink_bright8" is not used<filename> Hint: (5028) Local const "color_purple_bright5" is not used<filename> Hint: (5028) Local proc "PrintTokenizedInstruction" is not used<filename> Hint: (5028) Local proc "ZYAN_BITS_TO_REPRESENT" is not used<filename> Hint: (5028) Local proc "ZYAN_MAKE_STATUS" is not used<filename> Hint: (5028) Local type "PATTRIBUTES_MAP" is not used<filename> Hint: (5028) Local type "TINSTRUCTION_INPUT" is not used<filename> Note: (3031) Values in enumeration types have to be ascending<filename> Note: (3031) Values in enumeration types have to be ascending<filename> Note: (3031) Values in enumeration types have to be ascending<filename> Note: (3031) Values in enumeration types have to be ascending<filename> Note: (5027) Local variable "AbsoluteAddress" is assigned but never used<filename> Note: (5027) Local variable "CodeNext" is assigned but never used<filename> Note: (5027) Local variable "FilenameLen" is assigned but never used<filename> Note: (5027) Local variable "FilenameLen" is assigned but never used<filename> Note: (5027) Local variable "Offset" is assigned but never used<filename> Note: (5027) Local variable "PatternSize" is assigned but never used<filename> Note: (5027) Local variable "Status" is assigned but never used<filename> Note: (5027) Local variable "ThreadId" is assigned but never used<filename> Note: (5027) Local variable "buf" is assigned but never used<filename> Note: (5027) Local variable "hr" is assigned but never used<filename> Note: (5027) Local variable "hr" is assigned but never used<filename> Note: (5027) Local variable "i" is assigned but never used<filename> Note: (5027) Local variable "sprintf_buffer" is assigned but never used<filename> Warning: (4044) Comparison might be always false due to range of constant and expression<filename> Warning: (4044) Comparison might be always false due to range of constant and expression<filename> Warning: (4044) Comparison might be always false due to range of constant and expression<filename> Warning: (4110) range check error while evaluating constants (2147942487 must be between -2147483648 and 2147483647)<filename> Warning: (4110) range check error while evaluating constants (2147942487 must be between -2147483648 and 2147483647)<filename> Warning: (5036) Local variable "Y" does not seem to be initialized<filename> Warning: (5036) Local variable "Y" does not seem to be initialized<filename> Warning: (5036) Local variable "Y" does not seem to be initialized<filename> Warning: (5036) Local variable "Y" does not seem to be initialized<filename> Warning: (5036) Local variable "Y" does not seem to be initialized<filename> Warning: (5036) Local variable "Y" does not seem to be initialized<filename> Warning: (5037) Variable "OutFlagsSectionMetrics" does not seem to be initialized<filename> Warning: (5037) Variable "OutInstructionIndexSequential" does not seem to be initialized<filename> Warning: (5037) Variable "OutInstructionsOptimizedIndex" does not seem to be initialized<filename> Warning: (5037) Variable "OutInstructionsTbl" does not seem to be initialized<filename> Warning: (5037) Variable "OutInstructionsUniqueIndex" does not seem to be initialized
MarkMLl:
Use Lazbuild and filter the output using Perl. https://github.com/MarkMLl/fpclaz_build_scripts does something vaguely similar, in the context of finding where each source file is.
MarkMLl
Thaddy:
We don't need perl for that, we have supersort, which does that trick.
440bx:
--- Quote from: MarkMLl on June 16, 2024, 08:49:47 pm ---Use Lazbuild and filter the output using Perl.
--- End quote ---
The problem with "outside solutions" such as using Perl is that you can no longer click on the message to have Lazarus display the line in the editor window. IOW, making any corrections to the code becomes laborious.
That's the problem with the current output. The unorganized pile of messages makes it really time consuming to inspect the messages in order to determine which ones need attention. Having the messages grouped by "severity"/type would really help. Another thing that would help enormously would be to have the text of the messages left justified. This would require determining the widest/longest filename but it's easy and only a minimal amount of additional work.
PascalDragon:
--- Quote from: 440bx on June 16, 2024, 10:18:11 am ---I'd like Lazarus to sort the messages by type, that is, group all the "hints" together, "Notes" together, "Warnings" together. and within each group sort by line number (that can be accomplished simply by aligning the messages then sorting the text starting at the alignment column (very simple sort.)
--- End quote ---
Please note that there are sometimes occations that a followup, but related message has a different verbosity: E.g. when you have multiple overloads available the message that an overload could not be determined will have verbosity error and the followup list of found candidates will have verbosity hint.
This could lead to confusion, so this should at least not be done by default. Or maybe it could be done with category speed buttons so that one can enable/disable certain verbosities? So if you want to only see warnings you could simply disable all other verbosities?
Navigation
[0] Message Index
[#] Next page