Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
Description
We needlessly restrict QML components to never refer to each other in a cycle. We could easily allow cyclic references for properties, though. Only cyclic instantiations should produce an actual error. The cycle detection also leaks memory. A cyclic reference is also a shared pointer cycle.
This should be solved in a general way:
- We need to discern between soft dependencies (i.e. properties) and hard dependencies (inheritance).
- We need to discern between two processing stages. The compile step should run without any dependencies and the link step when all dependencies are compiled but not necessary linked yet. This requires some restructuring in the type compilation.
- This way there can be cyclic soft dependencies.
- in practice the type loader should track all dependencies centrally. It should assign a rank to hard dependencies and find cycles centrally that way. It should use some graph coloring to find connected sets of soft dependencies.
- if all nodes of a connected set of dependencies are compiled they can all be linked.
Attachments
Issue Links
- resulted from
-
QTBUG-117827 [Reg 6.6 -> 6.7] Bogus cyclic dependency warnings between singletons
- Closed