Hirse/brackets-outline-list

Bug with function names?

sQuarecoW opened this issue · 8 comments

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

  • Brackets Version: Release 1.8 build 1.8.0-17108
  • Brackets Outline List Version: 1.0.0-alpha.0

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..

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

@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.

@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

@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?

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

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

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

@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.