arduino-builder icon indicating copy to clipboard operation
arduino-builder copied to clipboard

Cache gcc warnings

Open facchinm opened this issue 7 years ago • 4 comments
trafficstars

... and display them even if the file is not being recompiled. Should allow removing 48aa042 from #301
There's a concurrency issue on cached prints that should be solved before merging.

facchinm avatar Oct 11 '18 10:10 facchinm

@matthijskooijman there's a mutex that prevents interleaving when printing via logger stream, but the fact that warnings are not getting interleaved right now looks like pure luck (or something I can't understand) :slightly_smiling_face: . However, compilers are quite normal beasts, they don't mess up with terminal magic like some uploaders do, so I believe we can safely cache everything and print atomically when the command returns.

facchinm avatar Oct 15 '18 16:10 facchinm

:white_check_mark: Build completed.

:arrow_down: Build URL: http://downloads.arduino.cc/PR/arduino-builder/arduino-builder-302.zip

:information_source: To test this build:

  1. Replace arduino-builder binary (you can find it where you installed the IDE) with the provided one

ArduinoBot avatar Oct 16 '18 07:10 ArduinoBot

@matthijskooijman I think I addressed all you concerns. At the end the interleaving only happens when the streams are crunched by the Java IDE (I'll take a closer look later), but they're fine when launched on a terminal. Thanks a lot for the review!

facchinm avatar Oct 16 '18 07:10 facchinm

:white_check_mark: Build completed.

:arrow_down: Build URL: http://downloads.arduino.cc/PR/arduino-builder/arduino-builder-302.zip

:information_source: To test this build:

  1. Replace arduino-builder binary (you can find it where you installed the IDE) with the provided one

ArduinoBot avatar Oct 16 '18 08:10 ArduinoBot