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

Refactor dependency management in DOM

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • 6.8
    • dev
    • QML: Tooling
    • None

    Description

      Currently loading of dependencies by DOM is hidden and way nontransparent. Dependencies are being added to the load queue implicitly as a callback for the LoadFile depending on the options with which DomEnvironment was created.

       

      Taking into account the Environment can be created, copied multiple times and moved around, it makes it hard to reason about the code attempting to loadFile whether it's going to load it with or without dependencies.

      Due to that problem, this commit https://codereview.qt-project.org/c/qt/qtdeclarative/+/527933?tab=comments has introduced a stack overflow, which was manifesting only on some platforms due to circular dependency: loadFile -> loadPendingDependencies -> advanceLoad -> loadFile (which should have been loadFileWithoutDependencies disregard of which options Env has)

       

      In the end, it's arguably a better option to

      a) remove Options:NoDependencies from the DomEnviroment

      b) expose 2 high level functions on the DomEnvironment loadFile (which will load only a file without dependencies and without adding them implicitly to the loading queue) and loadFileWithDependencies, which will do loading and spawn loading of dependencies in a more explicit manner.

       

      related: QTBUG-119550

      Attachments

        Issue Links

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

          Activity

            People

              dima.a Dmitrii Akshintsev
              dima.a Dmitrii Akshintsev
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes