padawan-php / padawan.php

php intelligent code completion http server
http://mkusher.name/padawan/
MIT License
253 stars 30 forks source link

Indexing fails with 9000 nesting level #72

Closed haringsrob closed 8 years ago

haringsrob commented 8 years ago

When I try to index a Drupal project, it ends with an error reaching the 9000 limit.

These are the last lines in the log:

[2016-11-30 21:28:10] completer.DEBUG: Processing node Symfony\Comp[44978/48629]
er\Tests\CliDumperTest [] []
[2016-11-30 21:28:10] completer.DEBUG: Indexing: [0.061321973800659]s [] []
[2016-11-30 21:28:10] completer.DEBUG: Memory: 331009504 [] []
[2016-11-30 21:28:10] completer.INFO: Progress: 49% [] []
[2016-11-30 21:28:10] completer.INFO: processing vendor/symfony/var-dumper/Tests
/Fixtures/GeneratorDemo.php [] []
[2016-11-30 21:28:10] completer.DEBUG: Cache status: disabled [] []
[2016-11-30 21:28:10] completer.ERROR: Parsing failed in file /Users/rob/Sites/c
lients/go-intranet/vendor/symfony/var-dumper/Tests/Fixtures/GeneratorDemo.php  [
] []
[2016-11-30 21:28:10] completer.INFO: Parsing: [0.0058910846710205]s [] []
[2016-11-30 21:28:10] completer.DEBUG: Processing nodes 0 [] []
[2016-11-30 21:28:10] completer.DEBUG: Indexing: [0.0069289207458496]s [] []
[2016-11-30 21:28:10] completer.DEBUG: Memory: 329638216 [] []
[2016-11-30 21:28:10] completer.INFO: Progress: 49% [] []
[2016-11-30 21:28:10] completer.INFO: processing vendor/symfony/var-dumper/Tests
/Fixtures/NotLoadableClass.php [] []
[2016-11-30 21:28:10] completer.DEBUG: Cache status: disabled [] []
[2016-11-30 21:28:10] completer.INFO: Traversing with 2 processors [] []
[2016-11-30 21:28:10] completer.INFO: Found 4 nodes [] []
[2016-11-30 21:28:10] completer.INFO: Parsing: [0.0022628307342529]s [] []
[2016-11-30 21:28:10] completer.DEBUG: Processing nodes 4 [] []
[2016-11-30 21:28:10] completer.DEBUG: Processing node Symfony\Component\VarDump
er\Tests\Fixtures\NotLoadableClass [] []
PHP Fatal error:  Maximum function nesting level of '9000' reached, aborting! in
 /Users/rob/Sites/other/padawan/vendor/mkusher/padawan/src/Entity/Collection/Spe
cification.php on line 50
PHP Stack trace:
PHP   1. {main}() /Users/rob/Sites/other/padawan/vendor/mkusher/padawan/bin/pada
wan:0
PHP   2. Application\CLI\App->handle() /Users/rob/Sites/other/padawan/vendor/mku
sher/padawan/bin/padawan:27
PHP   3. Application\BaseApplication->handle() /Users/rob/Sites/other/padawan/ve
ndor/mkusher/padawan/src/Application/CLI/App.php:16

This happens using padawan generate or :padawangenerate

haringsrob commented 8 years ago

class NotLoadableClass extends NotLoadableClass is there, so I guess this is normal..

We should be able to catch this somehow?

pbogut commented 8 years ago

Duplicate of https://github.com/mkusher/padawan.php/issues/42

haringsrob commented 8 years ago

True, this can be closed.. I looked for something similar but couldnt find it.