I would like to propose changes to scripts located inside framework-zephyr but I understood that they were not on git yet.
Is it possible to have a separate issue tracker for framework-zephyr pio scripts (namely install-deps.pyplatformio-build.py and platformio-pre-build.py ?
Problem statement :
In the current implementation zephyr dependencies are installed by parsing and downloading entries in main west.yml file in framework-zephyr folder. Installed dependencies version numbers are stored in state.json in _pio folder.
I found two improvements that should be relatively easy to implement (I can propose a PR if there is a git for these files)
1) Fix the way install-deps.py check if dependency should be installed or not. At the moment even if version number is stored in state.json, the only thing triggering download action is the presence (or the absence) of the module folder in _pio directory, no matter if the version has changed. Then no matter what, state.json is updated with new version hash, without upgrading the module itself.
Currently, the only way of changing the version of a dependency is to manually edit west.yml then to supress corresponding module folder to trigger module install.
2) In zephyr workflow, user can have a project based west.yml file that permits to have per project dependencies. This is currently not the case in platformio, where west.yml is not meant to be modified by the user. Proposed change is :
Add a path to a local west.yml in platformio-build.py using PROJECT_DIR
Check presence of a potential west.yml in the project folder, if so, feed this file path to the install-deps.py python cmd. (in function load_west_manifest())
Add a script argument in main of install-deps.py to retrieve correctly west.yml path.
Hi,
I would like to propose changes to scripts located inside
framework-zephyr
but I understood that they were not on git yet. Is it possible to have a separate issue tracker forframework-zephyr
pio scripts (namelyinstall-deps.py
platformio-build.py
andplatformio-pre-build.py
?Problem statement :
In the current implementation zephyr dependencies are installed by parsing and downloading entries in main
west.yml
file inframework-zephyr
folder. Installed dependencies version numbers are stored instate.json
in_pio
folder.I found two improvements that should be relatively easy to implement (I can propose a PR if there is a git for these files)
1) Fix the way
install-deps.py
check if dependency should be installed or not. At the moment even if version number is stored instate.json
, the only thing triggering download action is the presence (or the absence) of the module folder in_pio
directory, no matter if the version has changed. Then no matter what,state.json
is updated with new version hash, without upgrading the module itself. Currently, the only way of changing the version of a dependency is to manually editwest.yml
then to supress corresponding module folder to trigger module install.2) In zephyr workflow, user can have a project based
west.yml
file that permits to have per project dependencies. This is currently not the case in platformio, wherewest.yml
is not meant to be modified by the user.Proposed change is :
west.yml
inplatformio-build.py
usingPROJECT_DIR
west.yml
in the project folder, if so, feed this file path to theinstall-deps.py
python cmd. (in functionload_west_manifest()
)main
ofinstall-deps.py
to retrieve correctly west.yml path.get_cmake_code_model()
What do you think ?