platformio / platformio-vscode-ide

PlatformIO IDE for VSCode: The next generation integrated development environment for IoT
https://marketplace.visualstudio.com/items?itemName=platformio.platformio-ide
Apache License 2.0
1.2k stars 192 forks source link

Multiple requests to rebuild the project IntelliSense index #2363

Closed ivankravets closed 3 years ago

ivankravets commented 3 years ago

The reasons for "Multiple requests to rebuild the project IntelliSense index have been received" error:

  1. External tools or custom extra scripts DELETE PlatformIO Core's libdeps_dir that trigger infinitely VSCode to re-install all dependencies from scratch. Please fix your code and DO NOT manipulate with libdeps_dir manually. We recommended using the lib_dir folder for the private project libraries/components.
  2. 3rd-party antivirus tools block PlatormIO Core dependency installer.
  3. You made a lot of frequent changes to the platformio.ini file that triggered a lot of requests to rebuild the index. Wait for a few minutes, there is 10 minutes protection window.

If you still DO NOT AGREE with the steps above, you can rebuild the index manually by running the PlatformIO: Rebuild C/C++ Index command in VSCode.

Ductapemaster commented 7 months ago

Hi team, really appreciate you working on this for me. Unfortunately while the SSL warning has disappeared and I see the Python version has been upgraded, I am still having an issue with the multiple rebuild issue:

Screenshot 2024-01-08 at 11 12 28 AM

I have tried this on the dev branch as well, but have the same results. My libraries consistently download and then delete themselves, often breaking a compilation in process. I have to get lucky with timing to get my code to build properly.

Let me know what information I can supply that can help debug, thanks!

ivankravets commented 7 months ago

@Ductapemaster, please

  1. Close ALL VScode windows, projects, folders
  2. Download example https://registry.platformio.org/platforms/platformio/espressif32/examples/arduino-blink
  3. Unpack, open. Do you still experience this issue?
Ductapemaster commented 7 months ago

Hi Ivan, I did as instructed and I do not see the same behavior.

A couple of notes about my issue, in case they are helpful:

ivankravets commented 7 months ago

Have you read https://docs.platformio.org/en/latest/librarymanager/dependencies.html ? It would be best if YOU do NOT manipulate with libraries in runtime, otherwise, it will trigger all components from the integration to re-init the project.

Ductapemaster commented 7 months ago

I am not manipulating anything at runtime — I am using 3 libraries from the PIO system, included using the best practices laid out in that support page.

My platformio.ini looks like this:

;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:dodec_esp32]
platform = espressif32
board = esp32dev
framework = arduino
monitor_port = /dev/cu.usbserial-*
monitor_speed = 115200
build_flags = 
    -DLV_CONF_SKIP
    -DLV_CONF_INCLUDE_SIMPLE
    -DLV_COLOR_16_SWAP
    -DUSER_SETUP_LOADED=1
    -DST7796_DRIVER=1
    -DUSE_HSPI_PORT=1
    -DPIN_SDA=18
    -DPIN_SCL=19
    -DTFT_MISO=12
    -DTFT_MOSI=13
    -DTFT_SCLK=14
    -DTFT_CS=15
    -DTFT_DC=21
    -DTFT_RST=22
    -DTFT_BL=23
    -DLV_FONT_MONTSERRAT_12
    -DLV_FONT_MONTSERRAT_16
    -DLV_FONT_MONTSERRAT_20
    -DLV_FONT_MONTSERRAT_24
    -DLV_FONT_MONTSERRAT_26
    -DLV_FONT_MONTSERRAT_30
    -DLV_FONT_MONTSERRAT_44
    -DSPI_FREQUENCY=60000000
    -DSPI_READ_FREQUENCY=60000000
    -DSMOOTH_FONT
    -DCORE_DEBUG_LEVEL=5
lib_deps = 
    Bodmer/TFT_eSPI@^2.5.43
    lvgl/lvgl@^8.3.9
    fastled/FastLED@^3.6.0

When I compile, it downloads all the libraries:

Resolving dodec_esp32 dependencies...
Library Manager: Installing Bodmer/TFT_eSPI @ ^2.5.43
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Library Manager: TFT_eSPI@2.5.43 has been installed!
Library Manager: Installing lvgl/lvgl @ ^8.3.9
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Library Manager: lvgl@8.3.9 has been installed!
Library Manager: Installing fastled/FastLED @ ^3.6.0
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Library Manager: FastLED@3.6.0 has been installed!
Updating metadata for the vscode IDE...
Project has been successfully updated!

and

 *  Executing task in folder domecontroller_fw_esp32: platformio run --environment dodec_esp32 

Processing dodec_esp32 (platform: espressif32; board: esp32dev; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------
Library Manager: Installing Bodmer/TFT_eSPI @ ^2.5.43
Unpacking  [####################################]  100%
Library Manager: TFT_eSPI@2.5.43 has been installed!
Library Manager: Installing lvgl/lvgl @ ^8.3.9
Unpacking  [####################################]  100%
Library Manager: lvgl@8.3.9 has been installed!
Library Manager: Installing fastled/FastLED @ ^3.6.0
Unpacking  [####################################]  100%
Library Manager: FastLED@3.6.0 has been installed!
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (6.5.0) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: 
 - framework-arduinoespressif32 @ 3.20014.231204 (2.0.14) 
 - tool-esptoolpy @ 1.40501.0 (4.5.1) 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 36 compatible libraries
Scanning dependencies...
Dependency Graph
|-- TFT_eSPI @ 2.5.43
|-- lvgl @ 8.3.9
|-- FastLED @ 3.6.0
|-- SPI @ 2.0.0
|-- Wire @ 2.0.0
Building in release mode
...

Then at some time during the compilation step, if those downloaded files aren't already in use by the compiler, some process deletes them, often causing reinitialization and downloading of them, showing the above output again. Often the compilation fails because some dependency isn't available when it goes looking for it.

ivankravets commented 7 months ago

Could you share somewhere your project WITHOUT src folder? Have you set custom https://docs.platformio.org/en/latest/envvars.html ?

Ductapemaster commented 7 months ago

Here is my project without the src folder in it. I have not set any custom environmental variables, that I can remember. Is there an easy way for me to check if any are used?

domecontroller_fw_esp32.zip

ivankravets commented 7 months ago

I can't reproduce your issue. I see a few solutions:

  1. You try to disable ALL extension in the VSCode and keeping only PlatformIO + C/C++ extensions
  2. You email me@ikravets.com and we set the remote session. We can try to debug this issue together.
ZanderElectronics commented 7 months ago

I had this issue. Following worked for me: Delete Folder PlatformIO/Projects/MyProject/.pio/libdeps/MyDeviceName in (Windows) File Explorer / (MacOs) Finder and build. All Depencies are loading again but now it builds without Error.