In the project, I have libdeps of lvgl in platformio.ini
lib_deps =
lvgl@9.1
Every time I create a new file in src directory, platformio will re-build the whole library of lvgl and it spend a lot of time to build this project. For my old laptop, it takes 3min to build the project…
Is this a normal building process? Add a new file will trigger the library rebuild even it is not modilfied.
Is there a way to avoid the lvgl rebuild if we just create a new file? as the related configuration is fixed.
Thanks for your reply. I have disable all unrelated extensions. But it still rebuild all the dependency.
After I have tried a simple esp32 project which created from platformio with no other libdeps, seems it is the normal behavior.
If I just add a simple test.h file in src folder, it will rebuild the whole Arduino framework. The test.h is just a empty file with no content. But it will trigger the whole rebuild of the framework.
Edit the exiting file will not cause the rebuild but adding a file will makes platformio rebuild everything no matter what is the content of the file.
Hi max
I test it with simple project template using platformio in local drive. Please check about steps.
Do you know how to prevent the re-build if we just add a file?
At least not build the fastled library which we will not modify any code in that library.
Thanks.
I just noticed the same behavior. It is irrelevant whether a lib_deps is present or not. As soon as a new file is added to the project, the entire project is compiled. However, this only happens once after a file has been added. If this file is changed, a normal compilation process takes place.
Thanks for the test. If the library is small, then we don’t notice the build time.
So far, I edit all my code in main.cpp first, then create a new file once it is tested.