Community
Participate
Working Groups
Hi, now that all patches for Bug 514748 are merged, I'm opening a separate bug report to fix glitches seen while testing https://git.eclipse.org/r/#/c/94800/ Steps to reproduce : - create a new php file in a new php project - copy&paste php content of file errors/php54/testUseStatementUsage04.pdtt in the new php file - try some undo-redo using ctrl-z/ctrl-y to delete/re-add copied text, in some cases you will have "cannot be resolved" errors reported, sometimes none It's due to the fact that the ValidatorBuildParticipantFactory works on an obsolete DLTK indexed source module. Why? Because ValidatorBuildParticipantFactory calls ValidatorVisitor BEFORE the source module was reconciled by PhpReconcilingStrategy (using unit.reconcile()). PhpReconcilingStrategy and ValidatorVisitor are called asynchronously and the unit.reconcile() call is much slower than the ValidatorVisitor call, so ValidatorVisitor has few chance to be called with an up-to-date source module. It's also funny to see that when we click around with the mouse in the eclipse UI (somewhere outside the opened php editors -to hide text cursor- and then inside again -to show text cursor again-), or when we toggle between opened php editors, the glitches vanish because ValidatorBuildParticipantFactory is called again, but this time on a up-to-date reconciled source module. Somehow we should call ValidatorVisitor only after unit.reconcile() has finished, so any suggestions to do that are welcome! Thierry.
Same problems I had in PEX validators. My idea from past: 1. Introduce class loader type into project metadata, bug 472758 2. Auto create correct class loader types for composer projects 3. Introduce PSR validator (bug 381650). With class loader type should be simple 4. During validation don't use index when possible, but search class via class loader implementation. Today most php project is based on PSR-0 or PSR-4 classloaders. In this case, searching for declaration will be relatively simple. 5. Finally we will need bug 424750, so after structure change (rename method, namespace etc...) all references will be re-validated. Ideally if we could order index request, and index vendors (libs) and phars before standard buildpaths.
If I understand well, the idea is to find&cache classes based on class loaders, and this in parallel of the DLTK indexer?
In this case cache isn't necessary, because for PSR-0/4 class loaders we can walk over existing model directly (like between) categories. Off course we can also modify DLTK API to allow control indexing during build process. Except build participant, this will not affect PDT code, but require changes in DLTK Indexing API.
I would clearly prefer changing the DLTK Indexing API, because I always feel a bit scared when you have more than one way to retrieve a given information and that those informations are not centralized and synchronized ;) The biggest problem for me (except the unit.reconcile() slowness) is that models and TI informations are not synchronized together. It would be nice to have easy notifications when the indexer updated a given model, so model validation would only trigger at this point. Hope I was clear ;)
New Gerrit change created: https://git.eclipse.org/r/96253
Gerrit change https://git.eclipse.org/r/96253 was merged to [master]. Commit: http://git.eclipse.org/c/pdt/org.eclipse.pdt.git/commit/?id=c621009609e2166d007a6e2e14580edb158bb6ae
New Gerrit change created: https://git.eclipse.org/r/98925
Second patch is just to remove some (now) useless IPHPScriptReconcilingListener.
New Gerrit change created: https://git.eclipse.org/r/99102
See also related bug 518128 and bug 518410.
New Gerrit change created: https://git.eclipse.org/r/99953
Gerrit change https://git.eclipse.org/r/99953 was merged to [master]. Commit: http://git.eclipse.org/c/pdt/org.eclipse.pdt.git/commit/?id=cf845202e5e55b76beefc34a9ea1792f44fce74c
New Gerrit change created: https://git.eclipse.org/r/99999
Gerrit change https://git.eclipse.org/r/99999 was merged to [master]. Commit: http://git.eclipse.org/c/pdt/org.eclipse.pdt.git/commit/?id=618848686420954651015bf84375665259022bc4