Hirse / brackets-outline-list

Extension for Brackets and Phoenix to display a list of the functions or definitions in the currently opened document.
MIT License
79 stars 30 forks source link

Bug with function names? #80

Closed sQuarecoW closed 7 years ago

sQuarecoW commented 7 years ago

MacOS 10.12.4 Beta (16E144f), MacPro (Late 2013)

I don't really know what is happening, but it seems that Outline does not reset the function name, but collects it all together.

screen shot 2017-02-03 at 08 59 35

This makes Brackets insanely slow, especially when in files with a lot of functions..

Zaporozhec7 commented 7 years ago

I have same problem too, and it make this extension not usable for me. Some time ago this extension was work fine. I have downgrade to version 0.7.0, which fork fine, until newest version is not fixed.

Hirse commented 7 years ago

@sQuarecoW, @Zaporozhec7 Please try the latest version 1.0.0-alpha.1 which fixes a couple of PHP related problems.

If you still experience the problem, please provide some sample code to reproduce it.

Zaporozhec7 commented 7 years ago

@Hirse I have tried latest 1.0.0-alpha.1 version before write this. I have seen that there are in release description said that fixed bugs with PHP. But there are still bugs present.

Please consider sample code below, with which problem present (make it separate file):

<?php

class Finder {

    public function getSomeThing(): Thing {

    }

    public function getSomeOtherThing(): OtherThing {

    }

    public function getThirdThing(): ThirdThing {

    }

}

I think problem related to PHP 7 new feature - return types. Because when i remove them from code, problem dissapear

Hirse commented 7 years ago

@Zaporozhec7 Yes, I think return types were not considered so far.

But that is a separate issue. Do you still experience the problem described in the first comment?

sQuarecoW commented 7 years ago

Didn't had a lot of time testing, but now, even with the latest version (1.1.0) there are no function names at all in php files. Css/html works as aspected..

Hirse commented 7 years ago

@sQuarecoW Please add a file that doesn't work as expected. I cannot reproduce any issues with the example @Zaporozhec7 provided.

sQuarecoW commented 7 years ago

account.php.zip

Looking for a file to give an example, I noticed that when I deleted everything below the first two functions, Outline works 😄

Looking further it almost seems like longer files (simply more lines) seem to make Outline stop working. In shorter files Outline does work

Hirse commented 7 years ago

@sQuarecoW This is a separate issue from the one originally described here and is caused by the multi-line strings in your code which I didn't account for so far.

Please see #91 for details.