-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Description
Introduction
This topic should really be of interest for anyone who uses west to pull in Zephyr components, which is likely a large majority at this time.
Generally though, the topic should be of interest to end users, TSC members, maintainers, product designers, module authors, etc.
Problem description
Modules are the primary vehicle used to scale Zephyr.
At the beginning, it was fairly inconsequential that there were 5-10 modules pulling in maybe ~100 MB of additional repositories, HALs, libraries, etc. However, as Zephyr and the Zephyr Community have grown, it's become a more frequent concern that the default behaviour (west update) pulls in several GB of repository data. Moreover, for the a common goal like running hello_world on a particular board, the vast majority of modules, and the GB of git repository data downloaded, are largely unused.
There was previously an attempt to push the problem onto users by grouping west repositories into categories (core, hal, etc). However, that does not seem to have worked as well we had hoped.
Proposed change
In an ideal world, everything would be optional. Our default should be to minimize the required packages to install and the required modules to download.
We propose something along the lines of "lazy module loading". I.e. automatically updating only the the git repositories necessary for a particular app using a particular configuration running on a particular board.
Automatically downloading dependencies during a build phase are generally not a great idea, so this should be an optional feature that is disabled by default.
Some potentially "nice" features to have would be
- maybe prompt users to download repos (if in an interactive shell)?
- maybe something like a "--fetch-only" option that does the fetching in a separate step for a given app / board / config
- maybe something like a "--dry-run" print out the list of repos that would need to be downloaded, so that people can manually do that in advance for their particular CI systems
- maybe something like a "deps --list" option
Additional notes
- It's not just west modules, but the tools (e.g. ubuntu / python packages) needed to deal with those modules
- augment module yaml schema with necessary packages
- ubuntu: (array of deb package-names..)
- macos: (array of package-names..)
- windows: (array of package-names..)
- pip: (array of package-names..)
- redhat: (array of package-names..)
- each of the above would of course be optional, but every module would be required to list its own dependencies outside of the most basic requirements for building Zephyr.
- augment module yaml schema with necessary packages
Detailed RFC
TODO
Proposed change (Detailed)
TODO
Dependencies
TODO
Concerns and Unresolved Questions
TODO
Alternatives
Deja-vu - we have had discussions and solutions about this several times.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status