Update all Contained Pieces Issue/Bug

I keep forgetting to bring this up. But after having to go through over 150 ‘pieces’ to correct them I really feel the need now. Specifically the ‘Update all contained pieces’ is seriously flawed.

Issue 1: The update process will only work where a ‘contained piece’ has exactly the same number of traits as the top most piece. Sometimes the actual traits can vary, but so long as it has the same number of traits it works. Not guaranteed though.

Issue 2: If you are slightly altering a trait, say a layer by enabling ‘always active’, then every piece (that matches the number of traits) that have that altered trait will be replaced by the trait from the first piece. This behavior is very annoying.

Pick any module and try it.

Yes, that is a reasonably accurate description of the problems.

The Mass Piece Definer is a truly ancient part of Java and no-one has ever been game to tackle it.

We’ll see what we can do, but the whole concept of ‘mass updating’ of a set of pieces that may or may not have much in common is fraught with danger and it is not all obvious what the ‘correct’ behaviour should be in many cases. I’m not sure it is even salvageable.

What would be really useful is if you could lay out some typical use cases that you have, and some rules on how we should handle the cases when the trait list in different pieces don’t match.

My feeling is it would probably be better if the Mass Piece Definer tried to do less, but did it properly. Does it need more options to control how it work?


Probably better to just remove it. Sounds like the return (functionality) on investment (time and effort) would be minimal.