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

Implement a common mechanism for passing import paths to all build-time QML tools

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • 6.11
    • None
    • QML: Tooling
    • None

      Problem
      The tests at QTBUG-137199 show that different QML tools receive different import paths.

      This is confusing: Even if the developer fixes all qmllint warnings, it's still possible that qmlsc/qmlcachegen are unable to find a module, causing the project to miss out on achievable optimizations.

       

      Suggestion
      Import paths are currently stored in *.rsp files and passed to qmllint. Could the *.rsp import paths be refactored out and shared between all build-time tools (qmllint, qmlsc/qmlcachegen, and qmltc)? This could simplify maintenance and reduce the risk of future divergence.

       

      Detailed discussion

      ulherman commented in QTBUG-137199 that

      One thing to consider with qmltc and qmlsc is that they generate code based on what they detect. They can only do so if they can be very certain that the same modules they see at compile time will also be there at run time. Otherwise you get crashes.

      I contend that we should use the lowest common denominator (the "safest" list of paths) for all tools. If we're being strict with qmlsc/qmltc to avoid importing the "wrong" module from the "wrong" path, then we should apply the same standards to qmllint.

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

            qtqmlteam Qt Qml Team User
            skoh-qt Sze Howe Koh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes