After loading Pier for a production site it is a good idea to start Persistency, so it can survive a crash. Unfortunately adding a new component causes an error similar to Conflict in Memento.
Created a test as:
MACheckedMementoTest>>testClassHasModelChangedElsewhere
self value: self class.
self memento reset.
self deny: self memento hasModelChangedElsewhereSeveral of the other tests use self write: instead of self value:, however this is what is used with components.
Code that makes the test work is:
MACheckedMemento>>reset
super reset.
self setOriginal: (self pullRawTransforming: [ :e | e isBehavior ifTrue: [ e ] ifFalse: [ e copy ] ])Using isBehavior in a test is not ideal, it is better to have classes not copy themselves. That would have a large impact.
Class>>copy ^ self
When experimenting with this, several of the browsers started raising errors (there is a giant X).
Changes in early 2024 resolved this problem, the above code changes were not necessary.