sblantipodi / glow_worm_luciferin

Bias Lighting and Ambient Light firmware, designed for Firefly Luciferin.
GNU General Public License v3.0
160 stars 19 forks source link

Remove deps from index #63

Closed krisrok closed 9 months ago

krisrok commented 9 months ago

Currently there are no specific versions set for the dependencies. This way, if you run a clean build it will pull the newest versions and build against them. This results in a corrupted build due to changes in the ArduinoJson lib.

With this PR the semi-hardcoded libs in the .pio folder get removed from the index and the folder is ignored. The working versions of the libraries are now set via platformio.ini. Now the client can just go ahead and pull the dependencies without breaking anything.

sblantipodi commented 9 months ago

hi @krisrok the fact that platformio.ini does not hard code libs version is intentional because I havent' found a way in platformio to check for updates when the lib version is hardcoded.

In this way, every time I want to check for an update I simply run pio pkg update and it update everything.

If I hardcode the version, I need to manually check for update and then update the libs manually...

can you suggest a better option for a better update process?

krisrok commented 9 months ago

Blindly updating library versions is not a common practice as far as I know. ArduinoJson's breaking changes in 7.x are a good example for why this is dangerous.

But you can comfortably check for newer versions running the "Outdated" task, e.g. via Terminal->Run Task or by using the PlatformIO sidebar (see screenshot).

Using the configuration proposed in this PR the task yields following output:

You could of course use something like bblanchon/ArduinoJson@6.*.* as well to just pinpoint the major version. But me, I'd rather use the specific version.

sblantipodi commented 9 months ago

Blindly updating library versions is not a common practice as far as I know. ArduinoJson's breaking changes in 7.x are a good example for why this is dangerous.

who said that I do it blindly? 🙂 this PR #58 added support for ArduinoJson7 the same day the library is released.

Using the configuration proposed in this PR the task yields following output:

I'm not using the PlatformIO IDE, I use CLion, what is the command to generate this output?

krisrok commented 9 months ago

who said that I do it blindly? 🙂 this PR #58 added support for ArduinoJson7 the same day the library is released.

Sorry, did not mean to come off harsh!

It's just a peculiar way of working with libraries that requires indexing them for all environments.

I'm not using the PlatformIO IDE, I use CLion, what is the command to generate this output?

Should be something like pio pkg outdated --environment glowwormluciferinfull_esp8266 for you.

sblantipodi commented 9 months ago

@krisrok no need to sorry no problem, I was just explaining why I haven't done it before :)

I'll merge this PR on the next release.

Thanks for your help.