Open Gabriel-Darbord opened 1 year ago
Yes that's one of the drawback of having caches. Another point is that if the removed entity is related to other entities (ex: the class owns methods), it will still be present in the other entities after removal (the methods still have the class as parentBehaviouralEntity)
The truth is that Famix models were never designed to evolve. They look more like a snapshot of a situation at one point in time.
In the past Jannick Laval designed Orion for this https://inria.hal.science/file/index/docid/498492/filename/Lava09b-IWST09-incrementalChange.pdf
When sending
removeFromModel
to an entity, I would expect the entity to be completely removed from the model. However:Also, sending
mooseModel
to the removed entity still answers the model, I feel like this shouldn't be the case.The issue comes from the
removeFromModel
method which sendsremoveEntity:
to its model with self as argument. If it usedremove:
instead, it could be fixed, but this method flushes the whole cache which isn't ideal. On the other hand,removeFromModel
ultimately sendsupdateCacheOnRemovalOf:
, which removes the entity from thebyType
cache of theMooseGroupRuntimeStorage
, but this doesn't affect the cache of the model.