Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add project based west.yml #23

Open
wants to merge 2 commits into
base: v4.0-branch
Choose a base branch
from

Conversation

jalinei
Copy link

@jalinei jalinei commented Dec 11, 2024

  • Modules version stored in state.json now correctly compared with west.yml revision hash
  • Add the possibility to provide dependencies through a project based west.yml file.
  • Add the possibility to skip large installation times due to default west.yml

Fixes #22
Tested on Ubuntu 20.04, I don't have access to a Windows machine to check classic curses..

Questions from my side :

  • I guess I should add the same workaround in clear_deprecated_package than in clean_up to wipe .git folder on windows machines ? I can add that commit when confirmed.
  • Is it really necessary to have install-deps.py script called from tool manager ? With the current logic, there is no way to skip the initial download, that encompass all packages defined in framework based west.yml which leads to unnecessary disk space occupation & installation times.
    (Example in Ststm32 platform : https://github.com/platformio/platform-ststm32/blob/develop/platform.py#L124)

My proposal would be to launch install-deps.py only from platformio-build.py, this way a potential local west.yml can be detected and install time can be dramatically reduced (from 3GB+ to approx 600MB in our case).

Opinion :

  • I don't really understand the added value of --secondary-installation parameter. I got that it permits to distinguish if script is launched from tool-manager or by platformio-build.py but in practice it does not change much.

Adding version management based on state.json.

Signed-off-by: Jean Alinei <jean.alinei@owntech.org>
Tested on Ubuntu 20.04

Signed-off-by: Jean Alinei <jean.alinei@owntech.org>
@jalinei jalinei changed the title Add project based west.yml - #22 Add project based west.yml Dec 11, 2024
@jalinei
Copy link
Author

jalinei commented Dec 18, 2024

@valeros did you have time to get an eye on this one ? 😃

@valeros
Copy link
Member

valeros commented Dec 18, 2024

Hi @jalinei, sorry for the delay, I'll look into the PR soon. In the meantime, could you please put together a few projects to properly test out this new functionality? I'm especially interested in more advanced examples that involve project-specific west.yml that partially overrides the default one.

@jalinei
Copy link
Author

jalinei commented Dec 18, 2024

My test branch is that one : https://github.com/jalinei/Core/tree/test_west

  • it can't compile without downloading dependencies from thingset that are not present in regular west.yml.
  • it has a specific version of zcbor that differs from regular west.yml (to test that after a default install, version is now correctly compared using state.json (can also be tested by forcing another hash version in state.json)
  • it has a forked hal to showcase how much we could shrunk the dependencies (only shipping stm32g4xx) for our specific case. Not working yet, because install-deps is still launched from project agnostic main platform.py so non expert user will still download default modules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improving west.yml support when using framework-zephyr
2 participants