On Fri, 2024-11-22 at 17:22 +0100, Quentin Schulz via lists.openembedded.org wrote: > Hi Joshua, > > On 11/22/24 4:49 PM, Joshua Watt via lists.openembedded.org wrote: > > The SPDX code makes heavy use of python classes. While this works very > > well, the bitbake dependency parser is unable to understand how to deal > > with them, and thus changes to the class code do not cause rebuilds to > > occur. To correct this, add the library files that include SPDX code as > > file checksums for the SPDX tasks. If this method works well for SPDX, > > we will look at implementing something similar in the bitbake dependency > > parser that should allow correct checksums without having to explicitly > > add them to each class. > > > > Oooooh that reminds me of this very issue happening at my previous company. > > I'm wondering if we shouldn't just add this file-checksums dependency at > the global level somehow? Since one needs to call addpylib > layer-dir/path directory in order to be able to import those modules in > tasks/functions. Maybe there's something we can hook there somehow? The > issue being we would either blindly reparse/rebuild all recipes when > those changes or we need a way to check which task(s) import those modules? > > Another option could be to forbid addpylib on a conf file and force it > inside recipes only, but I guess this means we cannot use those in > inline python in conf files anymore? which we do use in > meta/conf/bitbake.conf. > > The change itself looks fine to me though, wish I had this idea at my > previous company :)
The challenge is that you only want the dependencies at the points of usage. We could make bitbake just checksum all the files but it would mean a world rebuild for any single change, even a whitespace one. We're trying to be a little more clever than that. In this case the python file is basically the class so it does make more sense. We might be able to teach the dependency code about classes as a large object, that remains to be see. I'd not want to do it at the file level though in general. Cheers, Richard
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#207641): https://lists.openembedded.org/g/openembedded-core/message/207641 Mute This Topic: https://lists.openembedded.org/mt/109724577/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-