* * *

Author Topic: [SOLVED in FPC 3.1.1] How to see all warnings for the project?  (Read 2251 times)

Eugene Loza

  • Hero Member
  • *****
  • Posts: 531
    • My "almost daily" development blog
As usually I'm missing something basic... Or, maybe it's a feature request...
The issue is: on compile I can see only those warnings/hints that appear in a recently-changed unit (i.e. the one recompiled). If unit has not been changed I don't see any warnings for it, even those user-defined, even if I've just seen them a few seconds ago at previous compilation. I also don't see an exclamation mark for lines with warnings.
The only way to see all the warnings is to clean and recompile the project completely.
However, maybe there's an option to "save" warnings from previous compilations and preserve them in messages even if nothing has been changed.
« Last Edit: October 22, 2017, 08:19:31 am by Eugene Loza »
Lazarus 1.9 + FPC 3.1.1 Debian Jessie 64 bit.

My Free and Open Source games in Lazarus/FreePascal/CastleGameEngine:
https://decoherence.itch.io/
(and some ancient games in Turbo Pascal too)
Sources are here: https://github.com/eugeneloza?tab=repositories

Handoko

  • Hero Member
  • *****
  • Posts: 1802
  • My goal: build my own game engine using Lazarus
Re: How to see all warnings for the project?
« Reply #1 on: March 16, 2017, 08:15:21 am »
If I'm not wrong, you need to use "Build" (not compile):

Lazarus main menu > Run > Build.

Usually I just simply compile my project after minor modifications. But I sometimes use build to check the warnings. It will take longer time, but very useful to make sure everything is good.
« Last Edit: March 16, 2017, 08:21:26 am by Handoko »

Thaddy

  • Hero Member
  • *****
  • Posts: 4807
Re: How to see all warnings for the project?
« Reply #2 on: March 16, 2017, 11:25:48 am »
Alternatively, add the -B option to the commandline or the compiler options.
Provided the FPC and Lazarus sources are installed it will compile everything related to your project
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

Eugene Loza

  • Hero Member
  • *****
  • Posts: 531
    • My "almost daily" development blog
Re: How to see all warnings for the project?
« Reply #3 on: March 16, 2017, 12:31:41 pm »
Thanks a lot, Handoko and Thaddy! I'll try this asap :)
Lazarus 1.9 + FPC 3.1.1 Debian Jessie 64 bit.

My Free and Open Source games in Lazarus/FreePascal/CastleGameEngine:
https://decoherence.itch.io/
(and some ancient games in Turbo Pascal too)
Sources are here: https://github.com/eugeneloza?tab=repositories

Eugene Loza

  • Hero Member
  • *****
  • Posts: 531
    • My "almost daily" development blog
Re: How to see all warnings for the project?
« Reply #4 on: August 22, 2017, 12:37:42 pm »
Sorry for delayed answer...
Nope, it's not working, whatever I do (Build, Build Clean, Compile, Compile and run, etc...). It shows warnings/hints only for just-edited units.
Lazarus 1.9 + FPC 3.1.1 Debian Jessie 64 bit.

My Free and Open Source games in Lazarus/FreePascal/CastleGameEngine:
https://decoherence.itch.io/
(and some ancient games in Turbo Pascal too)
Sources are here: https://github.com/eugeneloza?tab=repositories

Handoko

  • Hero Member
  • *****
  • Posts: 1802
  • My goal: build my own game engine using Lazarus
Re: How to see all warnings for the project?
« Reply #5 on: August 22, 2017, 12:53:54 pm »
I just tested on my Lazarus 1.6.4 FPC 3.0.2 x86-64 Gtk2 on Ubuntu Mate. It worked correctly, the Build command always shows hints and warnings even I do not modify anything.

Maybe you can try to delete the lib folder.

Eugene Loza

  • Hero Member
  • *****
  • Posts: 531
    • My "almost daily" development blog
Re: How to see all warnings for the project?
« Reply #6 on: August 22, 2017, 12:59:12 pm »
Nope. I'm purging all project-related (non-source code) files before the compilation, like lib folder, bacukp folder, executables, etc. Still it shows all the compilation/build process, but no warnings/hints in messages window.
Maybe it's an issue with 1.8.0 release candidates?
Lazarus 1.9 + FPC 3.1.1 Debian Jessie 64 bit.

My Free and Open Source games in Lazarus/FreePascal/CastleGameEngine:
https://decoherence.itch.io/
(and some ancient games in Turbo Pascal too)
Sources are here: https://github.com/eugeneloza?tab=repositories

Handoko

  • Hero Member
  • *****
  • Posts: 1802
  • My goal: build my own game engine using Lazarus
Re: How to see all warnings for the project?
« Reply #7 on: August 22, 2017, 01:05:45 pm »
Maybe you have accidentally disabled the warnings/hints. Make sure all of the items is checked:
Lazarus main menu > Project > Project Options > Compiler Options > Messages

Also:
Lazarus main menu > Project > Project Options > Compiler Options > Verbosity

Eugene Loza

  • Hero Member
  • *****
  • Posts: 531
    • My "almost daily" development blog
Re: How to see all warnings for the project?
« Reply #8 on: August 22, 2017, 01:27:55 pm »
No, I have almost all warnings/hints possible enabled. And the behaviour is random. E.g. I see no warnings when I just have started the project. But after I work with it for some hours, it starts showing hints and warnings again. Nothing is changed inbetween.
I should check this behaviour at Windows (I have 1.6.4 version there)...
Lazarus 1.9 + FPC 3.1.1 Debian Jessie 64 bit.

My Free and Open Source games in Lazarus/FreePascal/CastleGameEngine:
https://decoherence.itch.io/
(and some ancient games in Turbo Pascal too)
Sources are here: https://github.com/eugeneloza?tab=repositories

Eugene Loza

  • Hero Member
  • *****
  • Posts: 531
    • My "almost daily" development blog
Re: How to see all warnings for the project?
« Reply #9 on: August 22, 2017, 01:49:46 pm »
The logs look like that (attached file).
If I Compile (after cleaning all the project folder, deleting lib/backup, executable, etc.) - I see no hints and no warnings.
If I Clean up and Build I get the very same result.
If I start editing the project and then recompile it, I get some of hints/warnings, but not all of them in the project. E.g. you can't see this one https://github.com/eugeneloza/decoherence/blob/master/src/deconavigation.pas#L64 in the attached log.
Lazarus 1.9 + FPC 3.1.1 Debian Jessie 64 bit.

My Free and Open Source games in Lazarus/FreePascal/CastleGameEngine:
https://decoherence.itch.io/
(and some ancient games in Turbo Pascal too)
Sources are here: https://github.com/eugeneloza?tab=repositories

taazz

  • Hero Member
  • *****
  • Posts: 4492
Re: How to see all warnings for the project?
« Reply #10 on: August 22, 2017, 02:11:54 pm »
The logs look like that (attached file).
If I Compile (after cleaning all the project folder, deleting lib/backup, executable, etc.) - I see no hints and no warnings.
If I Clean up and Build I get the very same result.
If I start editing the project and then recompile it, I get some of hints/warnings, but not all of them in the project. E.g. you can't see this one https://github.com/eugeneloza/decoherence/blob/master/src/deconavigation.pas#L64 in the attached log.
Isn't that the effect of smart compiling? since most of the units used are not compiled and simple linked in, there are no warnings to show. You clean up and rebuild, then the compiler produces the warnings as expected.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Eugene Loza

  • Hero Member
  • *****
  • Posts: 531
    • My "almost daily" development blog
Re: How to see all warnings for the project?
« Reply #11 on: August 22, 2017, 02:16:22 pm »
Isn't that the effect of smart compiling? since most of the units used are not compiled and simple linked in, there are no warnings to show. You clean up and rebuild, then the compiler produces the warnings as expected.
Yes, that's the way I see it. And that's the way it looks like.
BUT.
I delete everything before recompilation. Or are the compiled units stored elsewhere? Or, maybe they're stored somewhere in project options/lrs?
As I've posted above Clean up and Build doesn't show [any new] warnings.
Lazarus 1.9 + FPC 3.1.1 Debian Jessie 64 bit.

My Free and Open Source games in Lazarus/FreePascal/CastleGameEngine:
https://decoherence.itch.io/
(and some ancient games in Turbo Pascal too)
Sources are here: https://github.com/eugeneloza?tab=repositories

rvk

  • Hero Member
  • *****
  • Posts: 2974
Re: How to see all warnings for the project?
« Reply #12 on: August 22, 2017, 02:47:15 pm »
Maybe I think I see what you mean.

First I needed to add src to the other unit files otherwise I got an error compiling.

Second... I do see ALL the warnings with Shift+F9 (Build).
But no hints, only the one in decotime.pas  %)
(But you're saying you also don't see any warnings with Build ??)

Quote
Messages, Hints: 16
Note: Duplicate unit "castlewindowtouch" in "castle_base 6.3", orphaned ppu "C:\Users\Rik\Downloads\castle-engine-master\packages\lib\i386-win32\castlewindowtouch.ppu"
Note: Duplicate unit "castlewindowtouch" in "castle_window 6.3", ppu="C:\Users\Rik\Downloads\castle-engine-master\packages\lib\i386-win32\castlewindowtouch.ppu", source="C:\Users\Rik\Downloads\castle-engine-master\src\window\castlewindowtouch.pas"
Note: Duplicate unit "castlewindowrecentfiles" in "castle_base 6.3", orphaned ppu "C:\Users\Rik\Downloads\castle-engine-master\packages\lib\i386-win32\castlewindowrecentfiles.ppu"
Note: Duplicate unit "castlewindowrecentfiles" in "castle_window 6.3", ppu="C:\Users\Rik\Downloads\castle-engine-master\packages\lib\i386-win32\castlewindowrecentfiles.ppu", source="C:\Users\Rik\Downloads\castle-engine-master\src\window\castlewindowrecentfiles.pas"
Note: Duplicate unit "castlewindowprogress" in "castle_base 6.3", orphaned ppu "C:\Users\Rik\Downloads\castle-engine-master\packages\lib\i386-win32\castlewindowprogress.ppu"
Note: Duplicate unit "castlewindowprogress" in "castle_window 6.3", ppu="C:\Users\Rik\Downloads\castle-engine-master\packages\lib\i386-win32\castlewindowprogress.ppu", source="C:\Users\Rik\Downloads\castle-engine-master\src\window\castlewindowprogress.pas"
Note: Duplicate unit "castlewindowmodes" in "castle_base 6.3", orphaned ppu "C:\Users\Rik\Downloads\castle-engine-master\packages\lib\i386-win32\castlewindowmodes.ppu"
Note: Duplicate unit "castlewindowmodes" in "castle_window 6.3", ppu="C:\Users\Rik\Downloads\castle-engine-master\packages\lib\i386-win32\castlewindowmodes.ppu", source="C:\Users\Rik\Downloads\castle-engine-master\src\window\castlewindowmodes.pas"
Note: Duplicate unit "castlewindow" in "castle_base 6.3", orphaned ppu "C:\Users\Rik\Downloads\castle-engine-master\packages\lib\i386-win32\castlewindow.ppu"
Note: Duplicate unit "castlewindow" in "castle_window 6.3", ppu="C:\Users\Rik\Downloads\castle-engine-master\packages\lib\i386-win32\castlewindow.ppu", source="C:\Users\Rik\Downloads\castle-engine-master\src\window\castlewindow.pas"
Note: Duplicate unit "castleuistate" in "castle_base 6.3", orphaned ppu "C:\Users\Rik\Downloads\castle-engine-master\packages\lib\i386-win32\castleuistate.ppu"
Note: Duplicate unit "castleuistate" in "castle_window 6.3", ppu="C:\Users\Rik\Downloads\castle-engine-master\packages\lib\i386-win32\castleuistate.ppu", source="C:\Users\Rik\Downloads\castle-engine-master\src\window\castleuistate.pas"
Note: Duplicate unit "castlesoundmenu" in "castle_base 6.3", orphaned ppu "C:\Users\Rik\Downloads\castle-engine-master\packages\lib\i386-win32\castlesoundmenu.ppu"
Note: Duplicate unit "castlesoundmenu" in "castle_window 6.3", ppu="C:\Users\Rik\Downloads\castle-engine-master\packages\lib\i386-win32\castlesoundmenu.ppu", source="C:\Users\Rik\Downloads\castle-engine-master\src\window\castlesoundmenu.pas"
Note: Duplicate unit "castlemessages" in "castle_base 6.3", orphaned ppu "C:\Users\Rik\Downloads\castle-engine-master\packages\lib\i386-win32\castlemessages.ppu"
Note: Duplicate unit "castlemessages" in "castle_window 6.3", ppu="C:\Users\Rik\Downloads\castle-engine-master\packages\lib\i386-win32\castlemessages.ppu", source="C:\Users\Rik\Downloads\castle-engine-master\src\window\castlemessages.pas"
Compile Project, Mode: Default, Target: decoherence_desktop.exe: Success, Warnings: 50, Hints: 27
fgl.pp(978,1) Hint: "inherited" not yet supported inside inline procedure/function
fgl.pp(978,1) Hint: Inlining disabled
fgl.pp(993,1) Hint: "inherited" not yet supported inside inline procedure/function
fgl.pp(993,1) Hint: Inlining disabled
fgl.pp(1038,1) Hint: "inherited" not yet supported inside inline procedure/function
fgl.pp(1038,1) Hint: Inlining disabled
fgl.pp(1043,1) Hint: "inherited" not yet supported inside inline procedure/function
fgl.pp(1043,1) Hint: Inlining disabled
fgl.pp(1008,1) Hint: "inherited" not yet supported inside inline procedure/function
fgl.pp(1008,1) Hint: Inlining disabled
fgl.pp(1013,1) Hint: "inherited" not yet supported inside inline procedure/function
fgl.pp(1013,1) Hint: Inlining disabled
fgl.pp(998,1) Hint: "inherited" not yet supported inside inline procedure/function
fgl.pp(998,1) Hint: Inlining disabled
fgl.pp(1003,1) Hint: "inherited" not yet supported inside inline procedure/function
fgl.pp(1003,1) Hint: Inlining disabled
fgl.pp(1033,1) Hint: "inherited" not yet supported inside inline procedure/function
fgl.pp(1033,1) Hint: Inlining disabled
decotime.pas(58,2) Hint: User defined: maybe use raw integer for these values? That'll give approx +0.5% speed, but will require converting FPS_goal to integer
deconavigationnetwork.pas(26,6) Warning: Unit "CastleGenericLists" is deprecated: "use TList and TDictionary from Generics.Collections unit, it works for all types perfectly like we want"
deconavigationnetwork.pas(39,4) Warning: Comment level 2 found
decobody.pas(34,3) Warning: Comment level 2 found
decobody.pas(239,5) Note: Local variable "Animation" not used
decoabstractgenerator.pas(24,34) Warning: Unit "CastleGenericLists" is deprecated: "use TList and TDictionary from Generics.Collections unit, it works for all types perfectly like we want"
deconavigation.pas(64,4) Warning: User defined: light distance
decoplayercharacter.pas(33,3) Warning: Comment level 2 found
decoimages.pas(241,4) Warning: User defined: BUG: why Scaled image is not freed automatically?????
decofont.pas(138,16) Warning: Symbol "GrayscaleAlphaPixels" is deprecated: "use Pixels"
decofont.pas(186,24) Warning: Symbol "GrayscaleAlphaPixels" is deprecated: "use Pixels"
decointerfaceblocks.pas(234,6) Warning: User defined: todo
decointerfacecomposite.pas(642,6) Warning: User defined: todo
decointerfacecomposite.pas(706,10) Warning: User defined: todo
decoabstractworld3d.pas(227,3) Warning: Comment level 2 found
decoabstractworld3d.pas(230,7) Warning: Comment level 2 found
decoabstractworld3d.pas(235,5) Warning: Comment level 2 found
decoabstractworld3d.pas(239,7) Warning: Comment level 2 found
decoabstractworld3d.pas(243,46) Warning: Comment level 2 found
decoabstractworld3d.pas(244,3) Warning: Comment level 2 found
decoabstractworld3d.pas(254,4) Warning: User defined: todo
decoabstractworld3d.pas(353,10) Warning: User defined: Memory Leak Here
decoabstractworld3d.pas(443,25) Warning: Constructing a class "DMonster" with abstract method "Die"
decoabstractworld3d.pas(444,6) Warning: User defined: todo
decoactor.pas(288,4) Warning: User defined: dummy
decoactor.pas(298,4) Warning: User defined: dummy
decoactor.pas(582,4) Warning: User defined: dummy, should set LastTime here
decoactor.pas(602,55) Warning: User defined: sometimes it's not enough, why???
decoactor.pas(732,4) Warning: User defined: todo
decointerface.pas(791,4) Warning: User defined: Memory Leak here
decomouse.pas(142,6) Warning: User defined: this calls back Window.OnMouseMove!!!!
decodungeongenerator.pas(24,34) Warning: Unit "CastleGenericLists" is deprecated: "use TList and TDictionary from Generics.Collections unit, it works for all types perfectly like we want"
decodungeongenerator.pas(458,4) Warning: User defined: tiles count might be zero!
decodungeongenerator.pas(463,4) Warning: User defined: tiles count might be zero!
decodungeongenerator.pas(468,4) Warning: User defined: tiles count might be zero!
decodungeongenerator.pas(616,4) Warning: User defined: may hang up forever here, if paremeters cannot be satisfied
decodungeongenerator.pas(1174,76) Warning: Comment level 2 found
decodungeongenerator.pas(1176,10) Warning: User defined: not working yet
decodungeongenerator.pas(1162,5) Note: Local variable "dx" not used
decodungeongenerator.pas(1162,8) Note: Local variable "dy" not used
decodungeongenerator.pas(1162,11) Note: Local variable "dz" not used
decodungeongenerator.pas(1270,31) Warning: Comment level 2 found
decodungeongenerator_calculatefaces.inc(20,10) Warning: User defined: floor/ceiling not working!
decodungeongenerator_calculatefaces.inc(20,10) Warning: User defined: floor/ceiling not working!
decodungeonworld.pas(92,4) Warning: User defined: dummy
decodungeonworld.pas(127,6) Warning: User defined: reset all tiles visibility here
decodungeonworld.pas(171,4) Warning: User defined: dummy
decodungeonworld.pas(179,4) Warning: User defined: todo
decodungeonworld.pas(182,4) Warning: User defined: this is wrong
decodungeonworld.pas(198,6) Warning: User defined: this is ugly
decosound.pas(421,3) Warning: Comment level 2 found
decosound.pas(424,3) Warning: Comment level 2 found
decosound.pas(425,3) Warning: Comment level 2 found
decosound.pas(473,4) Warning: User defined: the track may be not loaded yet!
decosound.pas(235,5) Note: Private field "DMusicManager.Ambient" is never used
decosound.pas(237,5) Note: Private field "DMusicManager.Music" is never used
decosound.pas(237,11) Note: Private field "DMusicManager.OldMusic" is never used
decoherence.pas(294,4) Warning: User defined: BUUUUUUUUUUUUUUUUUG!!!!!
decoherence.pas(52,5) Note: Local variable "LoadThread" not used
« Last Edit: August 22, 2017, 02:49:20 pm by rvk »

rvk

  • Hero Member
  • *****
  • Posts: 2974
Re: How to see all warnings for the project?
« Reply #13 on: August 22, 2017, 02:50:35 pm »
YIKES. I found it.

You have this in your decotime.pas

Code: Pascal  [Select]
  1.     QueryPerformanceCounter({$hints off}Result{$warnings on})
It shuts off the hints but NEVER enables them again !!!
(it enables warnings but you didn't shut off warnings but hints  :P)

You probably wanted to write
Code: Pascal  [Select]
  1.     QueryPerformanceCounter({$hints off}Result{$hints on})

Check all the other {$xxx off} for the same problem (but I think that's the only causing the problem).
After this change I got all the hints.
« Last Edit: August 22, 2017, 02:53:29 pm by rvk »

Eugene Loza

  • Hero Member
  • *****
  • Posts: 531
    • My "almost daily" development blog
Re: How to see all warnings for the project?
« Reply #14 on: August 22, 2017, 02:58:44 pm »
First I needed to add src to the other unit files otherwise I got an error compiling.
What kind of error do you get? I should have included all paths to the .lpi file... I should fix this.

Quote
Second... I do see ALL the warnings with Shift+F9 (Build).
But no hints  %)
(But you're saying you also don't see any warnings with Build ??)
Yes. You definitely see all the warnings I could remember I've put there. Hmm...
I still think that the list of compiled units is stored somewhere (in .lps?) and while "smart compiling" compiles the units (being unable to find cleaned up .ppu files) it doesn't interact with "messages"...
I'll check what my Lazarus 1.6.4 + FPC 3.0.2 will show me in Windows in about an hour...

Quote
it enables warnings but you didn't shut off warnings but hints
AWWWWWWWW.... my bad  O:-). I'll fix this and see how it works for me. THANKS A LOT!!!!!!!!  :D
Lazarus 1.9 + FPC 3.1.1 Debian Jessie 64 bit.

My Free and Open Source games in Lazarus/FreePascal/CastleGameEngine:
https://decoherence.itch.io/
(and some ancient games in Turbo Pascal too)
Sources are here: https://github.com/eugeneloza?tab=repositories

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus