Page 1 of 1

How to install dependencies when your project's dependencies.lock file gets updated?

Posted: Wed Oct 02, 2024 3:44 pm
by jrgilman95
So there are two commands that I know of that can affect the dep.lock file:

Code: Select all

idf.py reconfigure
and

Code: Select all

idf.py update-dependencies
.

The issue is that these modify the dep.lock file, is there an equivalent to just

Code: Select all

idf.py install-dependencies
?

This would be extremely useful to have (for example, as a git hook) for our developers when the dep.lock file gets updated in the repository.

Just curious if I missed something here, I think that the lock gets "just downloaded" on each

Code: Select all

idf.py build
, but it would be nice to be able to just trigger a download without a build.

Re: How to install dependencies when your project's dependencies.lock file gets updated?

Posted: Thu Oct 03, 2024 9:58 pm
by chegewara
"dependencies.lock" keeps tracking managed components versions and hash, so it wont change unless you update some of managed components.
If i understand correctly you think about situation:
- you have project build on your PC
- git pull code with changed "dependencies.lock"
- you want to proceed with changes

In that case it is good to do one of these:
- idf.py set-target xxx - this will do full clean and download components with new versions - maybe there is better idf.py command but i like to use this one
- delete "managed_components" folder and idf.py build - it should download components and rebuild only required files, so its minimal rebuild option

Re: How to install dependencies when your project's dependencies.lock file gets updated?

Posted: Fri Oct 04, 2024 2:28 pm
by jrgilman95
Gotchya - so unfortunately no command like "install dependencies" it seems. I really wish they would add this, all other package managers for software I've used have had this option. Clearly the functionality exists since the build and set-target commands do something along these lines...

I think I may try that set-target command since that should force the redownload and is easy to add to a git hook (I didn't want to force a full rebuild on our developers' systems each git pull).

Re: How to install dependencies when your project's dependencies.lock file gets updated?

Posted: Fri Oct 04, 2024 3:00 pm
by chegewara
Sorry, I dont want to mislead you. Those are the options i know and i can think off, but i am not build system expert, so there may be an option or command you are looking for.