Hi All,
During my work on lazy loading of modules I stumbled upon the following
possible dependency graph that I would like to handle:
Y1 X2
^ ^
| |
(non-transitive) (non-transitive)
| |
| |
X1 Y2
^ ^
| |
\ /
\ /
\ /
\ /
\ /
\ /
Z
Where An means module named A version n.
In other words there is a cycle in dependency _names_ (but not actual
ResolvedModules)
Because Configuration uses DFS to find modules in parent configurations it is
impossible to create Configuration that would represent such a graph of
ResolvedModules.
1. I am trying to understand the reasoning behind DFS selection. While the
above situation is not very common (but not that uncommon in environments with
multiple modules developed separately) - BFS would handle the need to
“override” some dependencies with proper layering.
2. Is there a way to handle it today?
(Ab)using transitive dependencies might work - I could introduce artificial
module M ---(transitive)-->Y2 and make Z require M (so that resolution would
replace Y1 found by DFS with Y2 required transitively by M).
Am I missing something?
Thanks,
Michal