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

QQmlJS Parser/qmlls/QmlDom: support for partially invalid code

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • P2: Important
    • 6.8
    • 6.5, 6.6
    • QML: Tooling
    • None
    • b9bf657c0 (dev), da693f932 (dev)

    Description

      Currently, qmlls has troubles working with partially invalid code.

      This would require to change the parser, QmlDom and qmlls to have a strategy on how to handle invalid code to be able to still offer the qmlls-experience on the valid parts of a partially invalid file.

      As Fabian mentioned on https://codereview.qt-project.org/c/qt/qtdeclarative/+/491944 :
       

      While we might need this, that really needs a tracking task for a proper fix. While we're currently already failing at the parse level, so there's no hope in getting this done in the near future. But we need to fix this long term. It is vital for DevEx that partially broken documents still work.
      Compare rust-analyzer, elm or many other modern languages (or even compare to the experience of editing partially invalid Java in JetBrains or Eclipse).
      

       

      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
              sami.shalayel Sami Shalayel
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes