Calypso
Calypso copied to clipboard
Improve stability on wrong #isAbstract
I currently have an intern that is a beginner with Pharo and one thing happen a lot is that he creates a method #isAbstract and forget the return, which is a common mistake in Pharo.
In that case Calypso class pane crash because of a #mustBeBoolean error.
I think Calypso code should be more reliable on this and catch a potential error on #isAbstract.
Perhaps a QA rule would also help - if it could quick detect method name is "isAbstract" before it is saved?
QA rule can be added to help fix a potential error in a #isAbstract method, but it cannot help with my initial problem for two reasons:
- First, QA is launched after the saving of the method, so Calypso will already be crashed
- Second, it's probably not recommended but maybe one day someone will want to implement #isAbstract method for their model, not using it in its original intended way. I don't think Calypso should crash if it happens.
So, IMO the minimal fix for it is to catch a potential error and consider the class as non-abstract in that case. Adding a QA rule might be good as a next step.
I think it needs to be protected in more general way (not just isAbstract case). Any table decoration can be broken or half implemented. And browser should not crash because of that
From the other side isAbstract is used in many different features (not only to show italic class names). So users need to be protected