Correct way to export Functions in Overlays and use them in others

The reasoning is to be able to strip the fix-point later on. If you are using final to access a function which would later it-self use final, then you are going twice across the fix-point argument.

The fact of going twice across the fix-point argument implies that it would be harder to apply the grafting logic. The grafting logic currently exist theoretically, but there is no better alternative today in terms of implementation.

When the grafting logic would be used, then the same final might represent either the old, the new, or the patched package set. Going multiple time across final implies that a package would skip the patched package set, which implies that the grafting would not be used and that more programs would be considered as replacing the old package set with the new package set.

The reason for this convention is to avoid infinite loops, and to prepare everybody to embrace transparent grafting as a way to apply security updates in the future, by cherry-picking patches of interest without causing the recompilation of the world.

2 Likes