PlatformIO Community

Should libraries get automatically updated if they are specified in platformio.ini ?!

Hello !

I am curios to know if libraries will automatically get updated whenever I build a project if the respective libraries are specified inside platformio.ini.

Here’s how my platformio.ini looks like:

[env:esp32doit-devkit-v1]
platform = https://github.com/platformio/platform-espressif32.git
board = esp32dev
framework = arduino
board_build.flash_mode = qio
upload_port = /dev/ttyUSB0
monitor_port = /dev/ttyUSB0
monitor_speed = 115200

build_flags = -DCORE_DEBUG_LEVEL=5

#libraries
lib_deps =  https://github.com/me-no-dev/ESPAsyncWebServer.git
            https://github.com/me-no-dev/AsyncTCP.git
            https://github.com/marcmerlin/SmartMatrix_GFX.git
            https://github.com/marcmerlin/Framebuffer_GFX.git
            https://github.com/adafruit/Adafruit-GFX-Library.git
            https://github.com/FastLED/FastLED.git

And here is what I have in Library Manager:

asdcx.png

The focus is on Login_Page_try8.
As you can see they aren’t updated.

Is this normal ? Thank you !

1 Like

I would not want my library’s updating without my express permission, Imagine a library update that broke your code just before you compiled an update that you OTA’d onto thousands of customer units! :astonished:

2 Likes

I think you are right. It did happen to me once. I tried using the /stage version of the platform and it broke my code.
I don’t know how I wasn’t able to think of that…

1 Like

No, they won’t. They (libraries - and platforms) will download the first time automatically if not present. Otherwise, they remain at their current version unless you specifically run the ‘update libraries’ command. Having them update will never be an issue if you use the @version syntax in your lib_deps - as then PlatformIO will only ever install the specifically mentioned version of the library. :wink:

i.e. I have a preference to using the ID instead of name just incase PlatformIO ever gets confused. but for this project I have locked in a git commit version, and version numbers of two other libraries…

;75 - Timer
;567 - WifiManager
;583 - ModbusMaster

lib_deps = 
   75@bfef59000d
   567@0.14
   583@2.0.1

The same version specification pattern used for frameworks and platforms is used.

2 Likes

Yes, if you set this https://docs.platformio.org/en/latest/userguide/cmd_settings.html#auto-update-libraries

1 Like