D28043: [KDevelop] background parser job control (WIP)

René J.V. Bertin <noreply-Buy57tU0AsCGxO/ty/[email protected]>
Newsgroups gmane.comp.kde.devel.kdevelop
Message-ID <[email protected]>
rjvbb updated this revision to Diff 79868.
rjvbb added a comment.


  Updated and improved version:
  
  - the registration with the ProcessController is done "JIT", just before enqueing the first document for actual parsing
  - keep track of documents via the QUrls of IndexedStrings
  
  Both changes are necessary because the first set of documents to be parsed (= the documents restored on session launch?) may not actually get parsed (I see that with a session holding TCL-based projects), and that first set will not be deleted until the session exits. Then, BackgroundParser::documentClosed calls the proxy's unregisterUrl() method via a queued connection and those calls will be performed much later, after the Core cleanup handler has exitted. By then the IndexedString references are no longer safe to use, hence the need to store deep (QUrl) copies of them.
  Registering in JIT fashion with the ProcessController prevents a persistent job entry that I was seeing in sessions where none of the initial documents were actually parsed, and which caused instability if an attempt was made to cancel it via the ProcessController.

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28043?vs=77846&id=79868

REVISION DETAIL
  https://phabricator.kde.org/D28043

AFFECTED FILES
  kdevplatform/language/backgroundparser/backgroundparser.cpp
  kdevplatform/language/backgroundparser/backgroundparser.h
  kdevplatform/language/backgroundparser/parseprojectjob.cpp

To: rjvbb, #kdevelop, aaronpuchert
Cc: kdevelop-devel, hmitonneau, christiant, glebaccon, domson, antismap, iodelay, alexeymin, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.