Extensions do not always re-compile on save

I have been trying to figure out precisely when this happens, but sometimes when editing an extension the code is not re-compiled as it used to on save. In previous builds this was seamless, but now one sometimes has to re-init the extension. This is quite troublesome as sometimes one thinks there’s a bug in the code while in reality the class has not been recompiled.

I’ll try to document if there’s a consistent way to trigger this, but so far seems kind of random.

I have seen this happen and have also been unable to reproduce it. Please do post and tag me if you come up with a reproducible case or any info at all.

1 Like

Hey, out of curiosity are you using dependency callbacks in those extensions?

Not sure if I understand that terminology. Can you give an example of what a dependency callback would be?

It’s a newly added member of dependency class, that let’s you add a method of one extension to the list of callbacks of dependency object. That way every time dependency changes its value all the functions from the callback list gets called. Dependency Class | Derivative you can read about it here.

The reason I’m asking is that I saw this problem when if you add a method of one extension to the list of callbacks of another extension, then this link will prevent proper deletion of the extension when you re-init, re-save component etc.

I see! In my case, I’m not using a dependency class as such, but I am using a dependable dictionary via the StorageManager class. I guess under the hood these are related. Perhaps that is a hint of the issue?

1 Like

Quite possible. Maybe related to keeping an old extension around because Python’s garbage collector is confused. We’ve been researching this issue.

Definitely post a case if you can reliably reproduce

We did locate at least one case where this is happening (thanks @monty_python) which will be fixed in the next release