Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-119806

Clean up dependency tracking between composite types

    XMLWordPrintable

Details

    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:

      1. We need to discern between soft dependencies (i.e. properties) and hard dependencies (inheritance).
      2. 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.
      3. This way there can be cyclic soft dependencies.
      4. 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.
      5. if all nodes of a connected set of dependencies are compiled they can all be linked.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qtqmlteam Qt Qml Team User
              ulherman Ulf Hermann
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes