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

jrgilman95
Posts: 4
Joined: Fri Feb 09, 2024 1:08 am

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

Postby jrgilman95 » Wed Oct 02, 2024 3:44 pm

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.

chegewara
Posts: 2332
Joined: Wed Jun 14, 2017 9:00 pm

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

Postby chegewara » Thu Oct 03, 2024 9:58 pm

"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

jrgilman95
Posts: 4
Joined: Fri Feb 09, 2024 1:08 am

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

Postby jrgilman95 » Fri Oct 04, 2024 2:28 pm

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).

chegewara
Posts: 2332
Joined: Wed Jun 14, 2017 9:00 pm

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

Postby chegewara » Fri Oct 04, 2024 3:00 pm

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.

Who is online

Users browsing this forum: Google [Bot] and 58 guests