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

Disk caching broken for modules with multiple QML singletons

    XMLWordPrintable

Details

    • 2b52a997ce3679ac4c94b7c117b0ea11c1523b60 (qt/qtdeclarative/5.12)

    Description

      As a consequence of QTBUG-62243, QML singletons that import their own module trigger a cyclic dependency. While the cycle is "ignored" at load time due to the fix for QTBUG-64017, it is not ignored on the disk cache level and results in a constant case of "Checksum mismatch for cached version of mysingleton.qml".

      Perhaps the fix involves the following step that when type-compiling such a singleton, the resulting byte code and data structures mut not depend on the singleton itself. This may disable certain compile-time optimizations and result in run-time lookups instead (not sure where yet if any) and require detecting the cycle correctly at the import cache level.

      Edit: I thought this may be related to the circular dependency handling on the type loader level, but it doesn't look like it is. But there must be another way of triggering this though.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-66976
          # Subject Branch Project Status CR V

          Activity

            People

              ulherman Ulf Hermann
              shausman Simon Hausmann
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes