erichard / SublimePHPCompanion

A Sublime Text plugin that provides cool stuff for PHP 5.3+ coding session.
MIT License
931 stars 115 forks source link

find_use broken in last release #139

Closed hxss closed 4 years ago

hxss commented 4 years ago

After auto-update the package to new release 2.0.1 I can't use find_use command. On Sublime startup in console log prints this error:


reloading plugin PackageResourceViewer.package_resources
reloading plugin PHP Companion.PHP Companion
Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 125, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.3/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 "/opt/sublime_text/sublime_plugin.py", line 1199, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/home/hxss/.config/sublime-text-3/Installed Packages/PHP Companion.sublime-package/PHP Companion.py", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/opt/sublime_text/sublime_plugin.py", line 1199, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/home/hxss/.config/sublime-text-3/Installed Packages/PHP Companion.sublime-package/php_companion/commands/expand_fqcn_command.py", line 6, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/opt/sublime_text/sublime_plugin.py", line 1199, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/home/hxss/.config/sublime-text-3/Installed Packages/PHP Companion.sublime-package/php_companion/utils.py", line 86
    _path = normalize_to_system_style_path(_path)
                                                ^

When I call find_use nothing happen.

erichard commented 4 years ago

I just released v2.0.2. Can you tell me if it fix this ?

Corben78 commented 4 years ago

Just realized the same issue. Last line before the next plugin is loaded says: TabError: inconsistent use of tabs and spaces in indentation

edit: oh, just read you released an update. Do you know how long packagecontrol.io needs to see it?

edit2: but I can confirm that (manually) replacing the tabs with spaces before _path = normalize_to_system_style_path(_path) (on 2 lines) fixes the issue

ThibaudDauce commented 4 years ago

I have the same problem, but it's a new install so I'm not sure if there's something wrong with my configuration or it's the same problem following the update…

erichard commented 4 years ago

@ThibaudDauce @Corben78 The 2.0.2 include this fix. Can you confirm it's working ?

ThibaudDauce commented 4 years ago

I'm using the 2.0.2 and it's not working, but it may be my installation… :-(

Corben78 commented 4 years ago

@erichard automatic package update installed 2.0.2 last thursday (6 days ago) and it works.

ThibaudDauce commented 4 years ago

Ok so it's me :-D I will try to debug that. Thanks!