We need examples showing the importance of file import ordering
Summary
The ordering of imports into a virtual directory or real directory are believed to be important, because directories are created for files on demand and if any of those path components are also symlinks, the result will differ depending on whether the file or the symlink is imported first.
Before virtual directory support was added, the function process_list
accepted a presupplied ordered list of files to import, and if one was not supplied, used an order based on os.walk
. CAS-Based virtual directories went to great efforts to replicate this ordering exactly to avoid the possibility of breaking something which relied on the previous process_list
directories.
!991 (merged) will introduce a new private import function called fast_directory_import
which is fast because it does not provide these guarantees of ordering.
We need to provide good evidence that changing the file import order can produce genuinely different artifacts (or good evidence that it cannot). This may lead the way to simplifying the codebase in future.
https://wiki.gnome.org/Projects/BuildStream/ImportRules provides some more background on the problem.