-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
west.yml: lazy module loading #54276
Comments
Some PRs with associated conversations about this topic |
I think one question is what kinda of means do we convey how a given module is needed. For example, is that via some Kconfig symbols? |
Also, just throwing this out there, but we could consider this as a problem for a GSoC contributor 🤷 |
Thanks @cfriedt for opening up the issue. I think it's probably more important to us than a GSoC proposal, which after all 1) will not necessarily be picked and 2) can fail (not that we can't have a GSoC about it, but then probably we should wait until the GSoC completes with undertaking other attempts; I assume the ideal GSoC project should not be on a critical path, just to avoid unnecessary pressure on the student). I am for an apt-like behaviour w/r to asking the user - i.e. by default it will stop on recomending packages to download and wait for approval, you have to explicitly override that behavior but then everyone assumes you know what you are doing. A --download-all flag would probably make sense too. For determining modules, Kconfig makes sense to me too. |
Yea, I just won't have time to do this myself. So cannot be the assignee unfortunately. A GSoC contributor would be great in terms of someone to offload work to. Even if a GSoC fails, the work could still be used, etc. But yea, it might not necessarily be picked. Getting this right will not be an overnight problem though, by any means. Given that we have 55 modules right now, I would expect that part of the task would be to itemize the packages that each module depends on (pip, .deb, etc). That alone could take a considerable amount of time. |
I welcome someone developing a package manager based on west, but I have disclaimed this assignment already elsewhere. @cfriedt feel free to reopen and assign yourself or someone else if you're aware of a volunteer. |
@mbolivar-nordic - I don't know why this was assigned to you. It was originally an RFC |
Great article |
Lol - I definitely do not want to write a package manager. YAML FTW! Maybe an additional point, for that matter, should be a flag to completely silence package recommendations, because, as the article states, there are many different scenarios, and the YAML would just be a list of recommendations. E.g. if someone wants to build Zephyr on a Linux From Scratch system, and they have built all of the required packages, then they should be able to silence warnings. I think we just want to list recommended packages for the somewhat fixed OS versions that Zephyr supports. |
Move optional modules to a submanifest and make them optional by default. This is just a POC, might require some more thought. The idea is to look at the optional manifest as an area for modules that work with Zephyr, but not needed directly by zephyr. This could be documented somewhere for discovery purposes allowing users to enable such modules in their downstream if desired. See zephyrproject-rtos#54276 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move optional modules to a submanifest and make them optional by default. This is just a POC, might require some more thought. The idea is to look at the optional manifest as an area for modules that work with Zephyr, but not needed directly by zephyr. This could be documented somewhere for discovery purposes allowing users to enable such modules in their downstream if desired. See zephyrproject-rtos#54276 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move optional modules to a submanifest and make them optional by default. This is just a POC, might require some more thought. The idea is to look at the optional manifest as an area for modules that work with Zephyr, but not needed directly by zephyr. This could be documented somewhere for discovery purposes allowing users to enable such modules in their downstream if desired. See zephyrproject-rtos#54276 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move optional modules to a submanifest and make them optional by default. This is just a POC, might require some more thought. The idea is to look at the optional manifest as an area for modules that work with Zephyr, but not needed directly by zephyr. This could be documented somewhere for discovery purposes allowing users to enable such modules in their downstream if desired. See zephyrproject-rtos#54276 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move optional modules to a submanifest and make them optional by default. This is just a POC, might require some more thought. The idea is to look at the optional manifest as an area for modules that work with Zephyr, but not needed directly by zephyr. This could be documented somewhere for discovery purposes allowing users to enable such modules in their downstream if desired. See zephyrproject-rtos#54276 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move optional modules to a submanifest and make them optional by default. This is just a POC, might require some more thought. The idea is to look at the optional manifest as an area for modules that work with Zephyr, but not needed directly by zephyr. This could be documented somewhere for discovery purposes allowing users to enable such modules in their downstream if desired. See zephyrproject-rtos#54276 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move optional modules to a submanifest and make them optional by default. This is just a POC, might require some more thought. The idea is to look at the optional manifest as an area for modules that work with Zephyr, but not needed directly by zephyr. This could be documented somewhere for discovery purposes allowing users to enable such modules in their downstream if desired. See zephyrproject-rtos#54276 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move optional modules to a submanifest and make them optional by default. This is just a POC, might require some more thought. The idea is to look at the optional manifest as an area for modules that work with Zephyr, but not needed directly by zephyr. This could be documented somewhere for discovery purposes allowing users to enable such modules in their downstream if desired. See zephyrproject-rtos#54276 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
It wouldn't be easy in the general case. The |
There's an Unfortunately not for the faint of heart... :-(
BTW There is of course another Github label for this sort of optimizations too: |
Move optional modules to a submanifest and make them optional by default. This is just a POC, might require some more thought. The idea is to look at the optional manifest as an area for modules that work with Zephyr, but not needed directly by zephyr. This could be documented somewhere for discovery purposes allowing users to enable such modules in their downstream if desired. See zephyrproject-rtos#54276 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move optional modules to a submanifest and make them optional by default. This is just a POC, might require some more thought. The idea is to look at the optional manifest as an area for modules that work with Zephyr, but not needed directly by zephyr. This could be documented somewhere for discovery purposes allowing users to enable such modules in their downstream if desired. See zephyrproject-rtos#54276 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move optional modules to a submanifest and make them optional by default. This is just a POC, might require some more thought. The idea is to look at the optional manifest as an area for modules that work with Zephyr, but not needed directly by zephyr. This could be documented somewhere for discovery purposes allowing users to enable such modules in their downstream if desired. See zephyrproject-rtos#54276 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move optional modules to a submanifest and make them optional by default. This is just a POC, might require some more thought. The idea is to look at the optional manifest as an area for modules that work with Zephyr, but not needed directly by zephyr. This could be documented somewhere for discovery purposes allowing users to enable such modules in their downstream if desired. See zephyrproject-rtos#54276 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move optional modules to a submanifest and make them optional by default. This is just a POC, might require some more thought. The idea is to look at the optional manifest as an area for modules that work with Zephyr, but not needed directly by zephyr. This could be documented somewhere for discovery purposes allowing users to enable such modules in their downstream if desired. See #54276 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move optional modules to a submanifest and make them optional by default. This is just a POC, might require some more thought. The idea is to look at the optional manifest as an area for modules that work with Zephyr, but not needed directly by zephyr. This could be documented somewhere for discovery purposes allowing users to enable such modules in their downstream if desired. See zephyrproject-rtos#54276 (cherry picked from commit f30f08a) Original-Signed-off-by: Anas Nashif <anas.nashif@intel.com> GitOrigin-RevId: f30f08a Change-Id: I3bc86795625ca7be3e13acc918772bc3b6682593 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/4907227 Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com> Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com> Tested-by: Fabio Baltieri <fabiobaltieri@google.com>
Hi, I just made a start with migrating our project to zephyr 3.5, and found that zscilib was not available. I see that this change has been integrated into v3.5 and I assume I need to add zscilib as an optional include into our west manifest/cmakelists. Any guide as to how I go about this? |
You can enable the module again by running @kartben should we update the 3.5 migration guide and backport it? |
Ya I was thinking just this when reading this earlier. Frankly I am not sure how we missed it but this is very much a "required change" thing. +1 for adding it to the migration guide and making sure this also gets backported. Luckily my guess is that many people will access the migration guide from "/latest" so the only place it will still be missing is the actual 3.5.0. |
Instead of having the full version in the URL of version-specific documentation, would it perhaps make sense to drop the last version component and just use And then the version-specific documentation for a release would always be generated based on stable branch of that release (e.g. v3.5-branch in the case of Zephyr 3.5). That way we could backport important documentation fixes, and have them published on docs.zephyrproject.org. Thoughts? |
Thanks for the quick answer. Luckily my guess is that many people will access the migration guide from "/latest" so the only place it will still be missing is the actual 3.5.0. just checked as a layman and I hit the latest release notes and end up on the latest migration guide. Also hit latest when I go look at the v3.4.0 guide. So in my experience this is true |
Opened #64619 |
Noob here, So all that needs to be done is not to download everything at installation, isn't it? |
This breaks module samples like those in |
But if I didn't select a target environments then there shouldn't be any example in the first place, otherwise it's a waste of space/bandwidth. |
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 runninghello_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
Additional notes
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.
The text was updated successfully, but these errors were encountered: