Closed joachim-n closed 6 years ago
Hi joachim-n,
Thanks for using this package. Would you mind to provide more information? Such as the platform and language(C/Javascript/PHP or others) you are using, and if there any error message in the Console of Developer Tools?
I'm on OS X, and my files are in PHP.
There is message in the console which may be relevant:
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at Object.execute (/Users/joachim/.atom/packages/atom-autocomplete-php/lib/services/php-proxy.coffee:48:40)
at Object.methods (/Users/joachim/.atom/packages/atom-autocomplete-php/lib/services/php-proxy.coffee:201:20)
at Object.getMemberContext (/Users/joachim/.atom/packages/atom-autocomplete-php/lib/services/php-file-parser.coffee:688:27)
at FunctionProvider.module.exports.FunctionProvider.extractAnnotationInfo (/Users/joachim/.atom/packages/atom-autocomplete-php/lib/annotation/method-provider.coffee:17:27)
at FunctionProvider.module.exports.AbstractProvider.placeAnnotation (/Users/joachim/.atom/packages/atom-autocomplete-php/lib/annotation/abstract-provider.coffee:103:27)
at FunctionProvider.<anonymous> (/Users/joachim/.atom/packages/atom-autocomplete-php/lib/annotation/abstract-provider.coffee:92:18)
at FunctionProvider.module.exports.AbstractProvider.registerAnnotations (/Users/joachim/.atom/packages/atom-autocomplete-php/lib/annotation/abstract-provider.coffee:91:13)
at /Users/joachim/.atom/packages/atom-autocomplete-php/lib/annotation/abstract-provider.coffee:26:14
at Workspace.observeTextEditors (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:725:15)
at FunctionProvider.module.exports.AbstractProvider.init (/Users/joachim/.atom/packages/atom-autocomplete-php/lib/annotation/abstract-provider.coffee:22:24)
at AnnotationManager.module.exports.AnnotationManager.init (/Users/joachim/.atom/packages/atom-autocomplete-php/lib/annotation/annotation-manager.coffee:17:22)
at Object.activate (/Users/joachim/.atom/packages/atom-autocomplete-php/lib/peekmo-php-atom-autocomplete.coffee:83:28)
at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app/src/package.js:253:25)
at /Applications/Atom.app/Contents/Resources/app/src/package.js:225:38
at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app/src/package.js:99:21)
at /Applications/Atom.app/Contents/Resources/app/src/package.js:218:32
at Package.module.exports.Package.activate (/Applications/Atom.app/Contents/Resources/app/src/package.js:215:40)
at PackageManager.module.exports.PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:645:40)
at /Applications/Atom.app/Contents/Resources/app/src/package-manager.js:626:35
at Config.module.exports.Config.transactAsync (/Applications/Atom.app/Contents/Resources/app/src/config.js:367:24)
at PackageManager.module.exports.PackageManager.activatePackages (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:621:25)
at PackageManager.module.exports.PackageManager.activate (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:603:52)
at /Applications/Atom.app/Contents/Resources/app/src/atom-environment.js:843:36
25php-file-parser.coffee [sm]:699 Failed to get methods for Drush\Commands\CodeBuilder\CodeBuilderCommands : Unexpected end of JSON input
Hi joachim,
From the message you provided, it seems that some problems in the atom-autocomplete-php package. Would you mind to disable package first and then see if it is ok for symbols-navigator package?
Or do you have more message about symbols-navigator package?
I've just tried installing the latest release, 1.1.0, and I've disabled atom-autocomplete-php.
The symbols tab is still completely blank.
There's nothing in the console.
Hi Joachim, Thanks for your response. I have no idea about it, but could you help me to do the test:
<?php function test() {} ?>
./universal-ctags-darwin -x --_xformat={line:%n,name:%N,kind:%K,scopeKind:%p,scope:%s,access:%a,signature:%S} test.php
{line:1,name:test,kind:function,scopeKind:,scope:,access:-,signature:()}
BTW, could you also let me know your OSX version?
Thanks!
Here's the output:
~/.atom/packages/symbols-navigator/vendor joachim$ more test.php
<?php function test() {} ?>
~/.atom/packages/symbols-navigator/vendor joachim$ ./universal-ctags-darwin -x --_xformat={line:%n,name:%N,kind:%K,scopeKind:%p,scope:%s,access:%a,signature:%S} test.php
Illegal instruction: 4
~/.atom/packages/symbols-navigator/vendor joachim$
My version of OS X is 10.11.6 (15G1510).
Thanks for the response!
The universal-ctags-drawin binary file was built by my MacOS, and it is OSX 10.12.6 on VMware. I used homebrew to build it. I'm not sure if it is the root cause.
Therefore, I built the binary file by myself (use autotools, document is in universal-ctags repository, ctags/docs/autotools.rst) and committed it into 1.2.0 version.
Please let me know if it works correct.
If there is still empty, could you help me do one more test? run this command:
./universal-ctags-drawin test.php
(with no any options)
If this binary file is worked, it will output simple symbols in a file with 'tags' filename. And the file will contain such as:
!_TAG_FILE_FROMAT 2 ......
!_TAG_FILE_SORTED 1 ......
!_TAG_OUTPUT_MODE ......
......
test XXX/test.php /^>?php function test() {} ?> $/;" f
Thanks a lot!
With the new version I get a tags file output, with this as the content:
joachim$ more tags
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/
!_TAG_PROGRAM_AUTHOR Universal Ctags Team //
!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/
!_TAG_PROGRAM_URL https://ctags.io/ /official site/
!_TAG_PROGRAM_VERSION 0.0.0 //
test test.php /^<?php function test() {} ?>$/;" f
Sounds great! It means this new version binary file is workable on your macOX, Do you see any symbols for test.php in symbols tab? BTW, I forgot to ask you about your version of Atom. Could you help to check it? Thanks a lot!
I'm on 1.22.1
I've just re-enabled this add-on and it's working!
Thanks very much for sorting it out!!
No problem, if you find some bugs, just let me know!
I've installed this package, and it adds a Symbols tab alongside the project file listing, but the tab is completely empty.