drewda / cucumber-sublime-bundle

Sublime bundle for Cucumber
65 stars 26 forks source link

Gherkin Auto-Complete Breaks in ST3 #18

Closed RobotGetsBored closed 9 years ago

RobotGetsBored commented 9 years ago

Today I must have gotten an auto update on this package and my autocomplete stopped working. After awhile I realized that it did work, but only on new, unsaved files. As soon as I saved the file, watching the console, I would see this:

Traceback (most recent call last):  
  File "/opt/sublime_text/sublime_plugin.py", line 358, in on_query_completions
    res = callback.on_query_completions(v, prefix, locations)
  File "GherkinAutoComplete in /home/dalvarez/.config/sublime-text-3/Installed Packages/Cucumber.sublime-package", line 103, in on_query_completions
  File "GherkinAutoComplete in /home/dalvarez/.config/sublime-text-3/Installed Packages/Cucumber.sublime-package", line 69, in is_feature_file
TypeError: argument of type 'NoneType' is not iterable

When I uninstalled this package, everything went back to normal.

bubenkoff commented 9 years ago

i'll look, thanks for report

twolfson commented 9 years ago

This has also broken tab completion on ST2. There are no errors popping up which is frustrating but thankfully I found this via:

http://www.reddit.com/r/SublimeText/comments/2tywbd/sublime_text_3_auto_complete_stopped_working/

bubenkoff commented 9 years ago

i pushed some fixes, please check

RobotGetsBored commented 9 years ago

Do you know when it will be available through Package Control? According to the Package Control page for this package the latest version is from the 27th.

EDIT Oh, right after I posted this it looks like it got updated. I will test it out presently.

RobotGetsBored commented 9 years ago

Nope, still seems to mess up the auto complete. No initial errors in the Console. When I open up a new file and start typing, then I get an error (rough glance, looks the same as before).

Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 358, in on_query_completions
    res = callback.on_query_completions(v, prefix, locations)
  File "GherkinAutoComplete in /home/dalvarez/.config/sublime-text-3/Installed Packages/Cucumber.sublime-package", line 118, in on_query_completions
  File "GherkinAutoComplete in /home/dalvarez/.config/sublime-text-3/Installed Packages/Cucumber.sublime-package", line 71, in is_feature_file
TypeError: argument of type 'NoneType' is not iterable
bubenkoff commented 9 years ago

please update again

RobotGetsBored commented 9 years ago

I no longer get that error, but still auto completion doesn't work. Sorry for all the trouble, but I do appreciate you attempting to fix this!

bubenkoff commented 9 years ago

what's in console when you save the file?

twolfson commented 9 years ago

Nothing is in the console. It looks like your return for the if is on the wrong line.

selection_019

Indenting the return into the if fixes the issue. I will submit a PR.

bubenkoff commented 9 years ago

that's cool you've found that it will work returning None, i wasn't sure about this looking at sublime text api docs - thanks!

RobotGetsBored commented 9 years ago

Yup, that did it. Thanks!

bubenkoff commented 9 years ago

thank You!