Author Topic: Compile something invalid, please  (Read 12163 times)

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Compile something invalid, please
« on: December 20, 2012, 03:12:27 am »
For those of you with 4 or more cores, could you please run this patch through the following test?
Before the patch:
  • Run a parallel build, and abort it in the middle (with the abort button)
  • Run a parallel build, and make sure a file in the middle of the process contains invalid code so that the build fails
Apply the patch, and repeat the above two steps, comparing how the compiler log has (or has not) changed.

This patch attempts to address strange logging behaviour when a parallel build fails.  (I have, of course, tested it already, however I only have access to dual-core, which may not be enough cores to find possible issues in this patch.)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Compile something invalid, please
« Reply #1 on: December 23, 2012, 06:11:42 pm »
...before:
Process terminated with status 0 (19 minute(s), 59 second(s))
50 error(s), 710 warning(s) (19 minute(s), 59 second(s))

...after:
Process terminated with status 1 (2 minute(s), 40 second(s))
50 error(s), 706 warning(s) (2 minute(s), 41 second(s))


BTW: These were not really errors...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Compile something invalid, please
« Reply #2 on: December 24, 2012, 06:07:07 am »
BTW: These were not really errors...
Those were not, but what I have been observing on my computer is something occasionally such as:
before:
Code
[...]
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))
Build log saved as:
file:///home/alpha/dev/cb/src/CodeBlocks-unix_build_log.html

Process terminated with status 0 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))
Build log saved as:
file:///home/alpha/dev/cb/src/CodeBlocks-unix_build_log.html

after:
Code
[...]
Process terminated with status 1 (0 minute(s), 0 second(s))

2 error(s), 0 warning(s) (0 minute(s), 0 second(s))
Build log saved as:
file:///home/alpha/dev/cb/src/CodeBlocks-unix_build_log.html

I wanted to make sure that in attempting to resolve this log duplication, I did not create some other problems.
Thanks for testing :).  (If you wanted to try to reproduce this bug, it seems to occur more often if after a build fails, you build again without changing anything, so the invalid file is the first to be compiled.)


By the way, seeing something like this is rather confusing to read quickly...
Code
/home/alpha/dev/cb/src/sdk/cbstatusbar.cpp||In member function ‘virtual wxString cbStatusBar::GetStatusTextByPlugin(cbPlugin*) const’:|
/home/alpha/dev/cb/src/sdk/cbstatusbar.cpp|50|error: ‘asdf’ was not declared in this scope|
/home/alpha/dev/cb/src/sdk/cbstatusbar.cpp|51|error: expected ‘;’ before ‘}’ token|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
||=== Build finished: 2 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|
... did the build work?!