enthought / envisage

Envisage is a Python-based framework for building applications whose functionalities can be extended by adding "plug-ins".
http://docs.enthought.com/envisage/
Other
82 stars 26 forks source link

WIP: Remove eagerness to evaluate extension points. #419

Closed kitchoi closed 3 years ago

kitchoi commented 3 years ago

This may fix #417

Main change: Remove the call which create the extension list cache early.

Prior to #354, there are a number of FIXME comments in the tests indicating that it was a bug to have to rely on first access of an extension in order for subsequent change events to fire. Creating the cache early resolves those FIXME, but #417 suggests that this is either a bug turned feature, or the FIXMEs then were misguided.

The laziness is relied on. Change events should not be fired until after first access.

As a result, it is possible to run into a race condition, but such a race condition may not matter.

(Not done here: Perhaps the FIXMEs should be changed in light of #417, as they are not actually something need solving.)

kitchoi commented 3 years ago

I should have marked this PR as a draft. Unfortunately, one cannot do so after it has been open (makes sense). As I cannot commit to following this through, I will close this PR shortly to avoid blocking future changes.