bradfeehan / SublimePHPCoverage

A plugin for Sublime Text 2 and 3, which visualises PHP code coverage data in the editor.
MIT License
57 stars 10 forks source link

Configuration not ready exception #16

Closed mauris closed 11 years ago

mauris commented 11 years ago

I'm getting a lot of the ConfigurationNotLoaded exception. Not sure why even after setting up everything properly. I am able to build and generate PHPUnit properly (clover.xml generated properly). But I can't get PHP Code Coverage to show up.

Traceback (most recent call last):
  File ".\sublime_plugin.py", line 175, in on_load
  File ".\sublime_plugin.py", line 154, in run_timed_function
  File ".\sublime_plugin.py", line 174, in <lambda>
  File ".\SublimePHPCoverage.py", line 87, in on_load
    self.on_load_async(view)
  File ".\SublimePHPCoverage.py", line 79, in on_load_async
    mediator.add(view)
  File ".\php_coverage\mediator.py", line 50, in add
  File ".\php_coverage\config.py", line 77, in __getattr__
php_coverage.config.ConfigurationNotLoaded: Configuration not ready yet

I'm using Sublime Text 2.0.1.

bradfeehan commented 11 years ago

Sorry about this. Since I'm mainly using Sublime Text 3 now, I'm less aware of what features are new and what aren't available. In this case, the plugin_loaded() function is a new thing in Sublime Text 3, and it's never called. Since that's where the configuration is loaded, it never gets loaded.

I've tested a fix for this in Sublime Text 2, and tagged the release 0.2.1. You should be able to update using Package Control (soon, depending on caching) or git pull, depending on how you installed it. Let me know if the problem continues, or if it works out for you.

mauris commented 11 years ago

Suspected the same when I did a little debugging. Upgraded package and working great. Thanks @bradfeehan for supporting oldie 2.0.1.

code-coverage