PIO/VSCode recompiles everything, every time

I wonder if this might be #2109 rearing it’s ugly head again, but I’d like some help with troubleshooting before deciding it’s a bug, please.

vscode 1.39.2
platformio 1.9.2 (though I’ve tried as old as 1.7.1 and can reproduce)
OS: deepin (debian-like) 15.11

Steps to reproduce:

  1. Install vscode
  2. Install platformio-vscode-ide
  3. Create new project (I’m using esp8266 and esp32)
  4. Click ‘build’ or ‘upload’ in bottom toolbar
  5. Observe terminal: everything builds (as expected)
  6. make no changes (to platformio.ini, code, anything at all)
  7. Click ‘build’ or ‘upload’ in bottom toolbar
  8. Observe terminal: everything builds again (NOT expected)

Will appreciate some help with troubleshooting.

With thanks,

G

I am running latest version op PIO (4.0.3) on OS X within Atom.

Same problem.

Recompiling Marlin after small changes in config.h results in a complete recompile, 11minutes total.
target processor: LPC1768

edit:
I upgraded PIO to the debug version.
When I recompile when nothing has changed, no code will be recompiled.

I guess that changes in the config impact all the sourcecode in theory, and therefor every file that includes the changed header file will be recompiled.

So no bug but a feature, alas.

Hello all,

Having same issues.

Running VC Code on ESP32 WROVER-B, ESPIDF, FreeRTOS using platformIO plug-in
VC Version: 1.40.1 (user setup)
Date: 2019-11-13T16:49:35.976Z
Electron: 6.1.2
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 6.1.7601

Any change in a lib or copy paste some new main.c/h files will force system to a complete recompile process that takes 13 minutes. (!!)
System recompiles whole bunch off Bluetooth TCPIP etc. stuff that wasn’t touched at all.

If you’d only change one source system just compiles this one but taking also approx 40-50sec. for just one piece, this is way too long.

Are there bulid settings to optimize it? Yet I wasn’t lucky finding some…

Any ideas?

Regards from Germany,
Peer :slight_smile:

40-50 sec. for just one changed file is too long indeed. Let’s ensure that your antivirus (if you have one) doesn’t interfere, try disabling it temporarily.

1 Like

Did you guys ever solve this? I’m brand new to PlatformIO, just installed it (the VSCode extension, on Windows), didn’t change any settings.

Opened the mbed-blink example for the Atmel Xplained Pro board. When I change one line in main(), even just myled = 1 to myled = 0, then build, it recompiles everything. Tested multiple times. No other changes in between (and no changes to platformio.ini).

I see others with the same problem eg: Entire MBED recompiles every time

I came here hoping to replace Atmel Studio with PlatformIO for faster build times.

I had the same issue whenever I tried to debug the micro.
Then I realized that my micro did not support debugging, and I only used released build.
In addition, I used the small tick icon in the blue bar that is usually at the bottom of the window, between the house and the right arrow. And only the modified file was compiled