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

qmlls: reuse the Dom instance for linting, instead of recreating it

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P3: Somewhat important
    • 6.8
    • 6.6
    • QML: Tooling
    • None
    • 675aea369 (dev)

    Description

      Currently, qmlls constructs the Dom twice for each document. This is because qqmlintsuggestions.cpp (the qmlls module that takes care of linting and showing errors and warnings) uses QQmlJSLinter::lintFile() to perform the lint:

      Currently, QQmlJSLinter::lintFile() does create a new Dom instance to perform its linting, but it should reuse the Dom created by QQmlCodeModel::newDocForOpenFile(). Same for all dependencies required for the Dom construction: QQmlJSResourceFileMapper, QQmlJSImporter, the QQmlDomAstCreator and QQmlJSImportVisitor inside of QQmlDomAstCreatorWithQQmlJSScope, etc.... See also createDom() in qqmldomastcreator.cpp and compare it to QQmlJSLinter::lintFile().

      Attachments

        Issue Links

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

          Activity

            People

              qtqmlteam Qt Qml Team User
              sami.shalayel Sami Shalayel
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes