spadgos / sublime-jsdocs

Simplifies writing DocBlock comments in Javascript, PHP, CoffeeScript, Actionscript, C & C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DocBlockr does not seem to work with latest SublimeText Build (3099)

alphanull opened this issue · comments

Title says it all. No idea why this is the case. Autocompletion just stopped working, i.e. typing /** and hitting TAB or RETURN afterwards simply does nothing anymore.

I have the same issue in Ubuntu 15.10. No errors in the sublime text console.

This is for all languages?

Show a startup log

Open the console: View > Show Console and get a copy the startup log.

Enable command logging

Get a log of what is happing when DocBlockr commands should be triggered by enabling some extra logging. In the Console input use the following to enable some extra logging:

sublime.log_input(True); sublime.log_commands(True); sublime.log_result_regex(True)

Now use docblockr and get a copy of the log.

I confirm the issue - OS X El Capitan 10.11.3

@gerardroche
I enabled extra logging, here's what I get:

chr evt: * (0x2a) chr evt: * (0x2a) key evt: tab command: insert_best_completion {"default": " ", "exact": false}

I used to /** and hit enter, but now ENTER doesn't work at all, if I TAB after it closes the block but but doesn't parse any function arguments, etc

You're getting:

chr evt: * (0x2a) 
chr evt: * (0x2a) 
key evt: tab 
command: insert_best_completion {"default": " ", "exact": false}

The jsdocs command is not being called.

The log should look like this:

On enter.

chr evt: / (0x2f)
chr evt: * (0x2a)
chr evt: * (0x2a)
key evt: enter
command: jsdocs

Or on Tab.

chr evt: / (0x2f)
chr evt: * (0x2a)
chr evt: * (0x2a)
key evt: tab
command: jsdocs

Is auto_indent enabled? In the console input sublime.active_window().active_view().settings().get('auto_indent')

Try uninstalling DocBlockr and reinstalling it?

@gerardroche
auto_indent is enabled. I tried uninstalling twice - manually and through package manager, no dice.

Same problem for me.

It seems to be something that has changed in build 3099. If its a bug suddenly exposed in DocBlockr or actually a bug within ST is not clear to me. In fact, reverting ST to build 3095 enables DocBlockr again, just reinstalling does not help. But despite of this workaround it would be of course very nice if this issue could be fixed, I cannot imagine living without DocBlockr ;)

Here's the changelog for 2 latest dev builds in question (3098, 3099):

Build 3099
Release Date: 29 January 2016
Fixed a code folding crash regression in 3098
Build 3098
Release Date: 29 January 2016
Improved Unicode support, including combining character rendering, character classification in regex searches, and case insensitivity in Goto Anything matching
Updates to many packages, with more substantial changes to D, Go and SQL
Stability improvements for Find in Files when using regular expressions that result in significant backtracking
Better handling of troublesome files during indexing
Fixed file truncation when using hexadecimal encoding
Syntax: Improvements to the Syntax Tests build system, including a new variant for measuring performance
Syntax: .sublime-syntax files with unused captures no longer cause spellcheck errors
Windows: ctrl+alt+p is no longer bound by default, due to compatibility issues with some keyboard layouts
Linux: crash_reporter is statically linked, improving system compatibility
API: Added Window.is_sidebar_visible() and Window.set_sidebar_visible()

Reverting back to 3096 fixed the issue.

Works for me on Ubuntu 14.04. Also on fresh install of ST with just package control, and docblockr installed.

Ubuntu 14.04
DocBlockr 2.14.1

DPI scale: 1
startup, version: 3099 linux x64 channel: dev
executable: /home/code/sublime_text_3/sublime_text
working dir: /
packages path: /home/code/.config/sublime-text-3/Packages
state path: /home/code/.config/sublime-text-3/Local
zip path: /home/code/sublime_text_3/Packages
zip path: /home/code/.config/sublime-text-3/Installed Packages
ignored_packages: ["Vintage"]
pre session restore time: 0.105981
startup time: 0.220481
first paint time: 0.224788
Unable to fetch update url contents
reloading plugin Default.block
reloading plugin Default.comment
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.delete_word
reloading plugin Default.detect_indentation
reloading plugin Default.duplicate_line
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.indentation
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_file_settings
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile_syntax_definition
reloading plugin Default.quick_panel
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.swap_line
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.trim_trailing_white_space
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin Python.syntax_test_python
reloading plugin 0_package_control_loader.00-package_control
reloading plugin 0_package_control_loader.01-ssl-linux
Package Control: Linux SSL: successfully loaded _ssl module for libssl.so.1.0.0
reloading plugin 0_package_control_loader.02-bz2
reloading plugin DocBlockr.jsdocs
reloading plugin Package Control.1_reloader
reloading plugin Package Control.2_bootstrap
reloading plugin Package Control.Package Control
plugins loaded
Package Control: Skipping automatic upgrade, last run at 2016-02-02 22:06:17, next run at 2016-02-02 23:06:17 or after
>>> sublime.log_commands(True); sublime.log_input(True)
command: drag_select {"event": {"button": 1, "x": 357.5, "y": 101.5}}
key evt: shift+control+p
command: show_overlay {"overlay": "command_palette"}
chr evt: s (0x73)
chr evt: e (0x65)
chr evt: t (0x74)
chr evt:   (0x20)
chr evt: s (0x73)
chr evt: y (0x79)
chr evt: n (0x6e)
chr evt:   (0x20)
chr evt: p (0x70)
chr evt: h (0x68)
chr evt: p (0x70)
command: set_file_type {"syntax": "Packages/PHP/PHP.sublime-syntax"}
chr evt: < (0x3c)
chr evt: ? (0x3f)
chr evt: p (0x70)
chr evt: h (0x68)
chr evt: p (0x70)
key evt: enter
command: commit_completion
key evt: enter
command: insert {"characters": "\n"}
key evt: enter
command: insert {"characters": "\n"}
key evt: enter
command: insert {"characters": "\n"}
chr evt: f (0x66)
chr evt: u (0x75)
chr evt: n (0x6e)
chr evt: c (0x63)
chr evt: t (0x74)
chr evt: i (0x69)
chr evt: o (0x6f)
chr evt: n (0x6e)
chr evt:   (0x20)
chr evt: t (0x74)
chr evt: e (0x65)
chr evt: s (0x73)
chr evt: t (0x74)
chr evt: ( (0x28)
command: insert_snippet {"contents": "($0)"}
chr evt: $ (0x24)
chr evt: a (0x61)
chr evt: r (0x72)
chr evt: g (0x67)
chr evt: ) (0x29)
command: move {"by": "characters", "forward": true}
key evt: enter
command: insert {"characters": "\n"}
chr evt: { (0x7b)
command: insert_snippet {"contents": "{$0}"}
key evt: enter
command: run_macro_file {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}
key evt: up
command: move {"by": "lines", "forward": false}
key evt: up
command: move {"by": "lines", "forward": false}
key evt: up
command: move {"by": "lines", "forward": false}
key evt: enter
command: insert {"characters": "\n"}
chr evt: / (0x2f)
chr evt: * (0x2a)
chr evt: * (0x2a)
key evt: enter
command: jsdocs

Post your complete startup logs. Be sure to enable command and input logging too e.g. sublime.log_commands(True); sublime.log_input(True)

Upon further testing it seems that it's somehow related to Sublime projects that were created before update to 3099.

I discovered that when I was editing unsaved php file, pre 3099 project -

chr evt: / (0x2f)
chr evt: * (0x2a)
chr evt: * (0x2a)
key evt: tab
command: insert_best_completion {"default": "   ", "exact": false}

Freshly created project (same file, same function)

chr evt: / (0x2f)
chr evt: * (0x2a)
chr evt: * (0x2a)
key evt: tab
command: jsdocs

Startup log -

startup, version: 3099 osx x64 channel: dev
executable: /Applications/Sublime Text.app/Contents/MacOS/Sublime Text
working dir: /
packages path: /Users/rinat/Library/Application Support/Sublime Text 3/Packages
state path: /Users/rinat/Library/Application Support/Sublime Text 3/Local
zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages
zip path: /Users/rinat/Library/Application Support/Sublime Text 3/Installed Packages
ignored_packages: ["JSONLint", "PHPUnit", "PHPUnit Completions", "Vintage"]
pre session restore time: 0.269548
using gpu buffer for window
startup time: 0.305949
first paint time: 0.329055
reloading plugin Default.block
reloading plugin Default.comment
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.delete_word
reloading plugin Default.detect_indentation
reloading plugin Default.duplicate_line
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.indentation
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_file_settings
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile_syntax_definition
reloading plugin Default.quick_panel
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.swap_line
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.trim_trailing_white_space
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin Python.syntax_test_python
reloading plugin 0_package_control_loader.00-package_control
reloading plugin 0_package_control_loader.01-pygments
reloading plugin 0_package_control_loader.02-bz2
reloading plugin 0_package_control_loader.50-pyyaml
reloading plugin AlignTab.aligner
reloading plugin AlignTab.aligntab
reloading plugin AlignTab.hist
reloading plugin AlignTab.parser
reloading plugin AlignTab.table
reloading plugin AlignTab.wclen
reloading plugin CodeFormatter.code_formatter
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 74, in reload_plugin
    m = importlib.import_module(modulename)
  File "./importlib/__init__.py", line 90, in import_module
  File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 678, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "code_formatter in /Users/rinat/Library/Application Support/Sublime Text 3/Installed Packages/CodeFormatter.sublime-package", line 26, in <module>
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 678, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/rinat/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter.py", line 25, in <module>
    from .codeformatter import reloader
  File "/Users/rinat/Library/Application Support/Sublime Text 3/Installed Packages/CodeFormatter.sublime-package/codeformatter/reloader.py", line 38, in <module>
  File "./imp.py", line 276, in reload
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 678, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/rinat/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter.py", line 25, in <module>
    from .codeformatter import reloader
ImportError: cannot import name reloader
reloading plugin Color Highlighter.ColorHighlighter
reloading plugin Color Highlighter.colors
reloading plugin DashDoc.DashDoc
reloading plugin DocBlockr.jsdocs
reloading plugin Evernote.sublime_evernote
reloading plugin FileDiffs.file_diffs
reloading plugin HTMLBeautify.HTMLBeautify
reloading plugin Indent XML.indentxml
reloading plugin Javascript Beautify.jsbeautify
reloading plugin LESS.less_completions
reloading plugin Markdown Preview.helper
reloading plugin Markdown Preview.markdown_settings
reloading plugin Markdown Preview.markdown_wrapper
reloading plugin Markdown Preview.MarkdownPreview
reloading plugin Package Control.1_reloader
reloading plugin Package Control.2_bootstrap
reloading plugin Package Control.Package Control
reloading plugin PHP Constructors.php-constructors
reloading plugin SideBarEnhancements.SideBar
reloading plugin SideBarEnhancements.SideBarAPI
reloading plugin SideBarEnhancements.SideBarDefaultDisable
reloading plugin SublimeLinter-jsxhint.linter
SublimeLinter: jsxhint linter loaded 
reloading plugin TrailingSpaces.trailing_spaces
reloading plugin Xdebug Client.main
reloading plugin CodeFormatter.CodeFormatter
CodeFormatter: formatting python files on ST3 not supported.
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 74, in reload_plugin
    m = importlib.import_module(modulename)
  File "./importlib/__init__.py", line 90, in import_module
  File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 678, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/rinat/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/CodeFormatter.py", line 26, in <module>
    from .codeformatter.formatter import Formatter
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 678, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/rinat/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/formatter.py", line 18, in <module>
    from .htmlformatter import HtmlFormatter
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 678, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/rinat/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/htmlformatter.py", line 12, in <module>
    import htmlbeautifier
ImportError: No module named 'htmlbeautifier'
reloading plugin HTML-CSS-JS Prettify.HTMLPrettify
reloading plugin PhpTidy.php_tidy
reloading plugin SublimeCodeIntel.ordereddict
reloading plugin SublimeCodeIntel.SublimeCodeIntel
reloading plugin SublimeLinter.commands
reloading plugin SublimeLinter.sublimelinter
reloading plugin SublimeLinter-phpcs.linter
SublimeLinter: phpcs linter loaded 
reloading plugin sublimetext_indentxml.indentxml
plugins loaded
CodeFormatter: Plugin Initialized
SublimeLinter: debug mode: off 
Package Control: Skipping automatic upgrade, last run at 2016-02-02 16:20:59, next run at 2016-02-02 17:20:59 or after

Actually, looks like it's only working for functions outside classes, any class methods don't work (PHP)

<?php

/**
 * [test description]
 * @param  string $arg [description]
 * @return [type]      [description]
 */
function test( $arg = '' ) {

}
class MyClass {
    /**
     * 
     */
    function test( $args = [] ) {

    }
}

@rinatkhaziev sounds like it could be an issue with ST caches.

For those on Ubuntu you can use this script to clean out the cache and optionally sessions and workspaces: https://gist.github.com/gerardroche/6e46cbdf8da19a39f9da

@gerardroche I've ran the script (I'm on OS X 10.11), and it runs successfully but doesn't resolve the problem.

I can confirm @rinatkhaziev observation, the plugin works outside of the scope of classes (PHP)

It's not necessarily if it's in a class. It's when there is whitespace before the opening /**. If you start from the gutter, the plugin works as expected.

Yes, and whitespace exists in most cases, at least with my code. It might be a bug which is exposed only now, and maybe has something to do with regexp parsing?

If it's not working in specific php cases then that's another issue.

I'm assuming that this entire issue is not just specific to PHP?

I'm also not able to reproduce any of these issues yet.

Nope, here it fails with JS

@alphanull can you post a complete log.

Try the new build 3100. Looks like there may have been regex and syntax issues https://www.sublimetext.com/3dev

https://forum.sublimetext.com/t/dev-build-3100/16929

Just tried 3100, still the same.

Build 3102 of SL appears to fix the problem for me.

Think it might have something to do with:

  • Fixed a 3096 regression in regular expressions when using the [[:space:]] character class

I can confirm that, 3102 apparently works for me as well.

Confirm WFM in 3103.

It's not working for 3114

It works well in build 3126. just type /** above the function, then enter TAB key. It works for me.

Not working in build 3126 with docblockr_python

@mmenschig docblockr_python is not associated with this project.

Windows 64-bit build 3126 the jsdocs_reparse command does nothing. I just end up with the cursor at the end of the comment block. No reflection of the changes in the function's arguments no fields reactivation. No error in the console. Posts correct command in the console with logging enabled. Any help appreciated.

Edit: if there is a [type] or [description] tag in the comment, the reparse command re-activates the fields. But I'd expect the reparse to re-evaluate the code beneath and add/remove the fields to reflect the actual state.

-pta-

@ptaczek Please open a separate issue because your issue sounds like it's specific to jsdocs_reparse. If you can provide a reproducible example it will be easier to address the issue. Give specific steps to reproduce and explain what you expect to happen and what actually happens after completing the steps.

Me neither sublime test3 3126 on ubuntu 64bits 16.04 system.

sublime.log_input(True); sublime.log_commands(True); sublime.log_result_regex(True)

useful!

You're getting:

chr evt: * (0x2a) 
chr evt: * (0x2a) 
key evt: tab 
command: insert_best_completion {"default": " ", "exact": false}

The jsdocs command is not being called.

The log should look like this:

On enter.

chr evt: / (0x2f)
chr evt: * (0x2a)
chr evt: * (0x2a)
key evt: enter
command: jsdocs

Or on Tab.

chr evt: / (0x2f)
chr evt: * (0x2a)
chr evt: * (0x2a)
key evt: tab
command: jsdocs

Is auto_indent enabled? In the console input sublime.active_window().active_view().settings().get('auto_indent')

Try uninstalling DocBlockr and reinstalling it?

It was not working for me too, I just fixed by uninstalling and reinstalling it.. thanks!

commented

Language: Python
Build: 4113
Issue: Docblockr is not working with functions (no auto parsing of parameters etc.)

/** + [enter] results in:
/**
*
*/
def readDataSet(logger,data_raw):

Log:
chr evt: / (0x2f)
chr evt: * (0x2a)
chr evt: * (0x2a)
key evt: enter
command: jsdocs
command: insert_snippet {"contents": "\n * ${0:}\n */"}