Hi,

If you have in your code a message send with a selector that is not implemented 
anywhere, it likely will result in a DNU

- but not if you compile a method on the fly (used in tests often)
- if the DNU is catched (e.g. for a proxy pattern)
- if the code is compatibility code, never executed in this version of the 
system


We can ban the rule, but that just stopps checking for the whole method for all 
selectors, what we want is to communicate that *this selector* is ok in this
special use (per method granularity is ok).

SystemNaviation>>#allUnimplementedCalls did have the feature that one can tag 
selectors that should be ignored. This uses the pragma 
#ignoreUnimplementedCalls:

see 
Context class >> initializePrimitiveSimulators


<ignoreUnimplementedCalls: #(#registerPrimitiveSimulators)>

 This was used in just one method, I think because a) the rule did not take it 
into account and b) the terminology is just wrong (“Call”).

I think
 
-  ReSentNotImplementedRule should takes this pragma into account
 -  change the bad terminology “allUnimplementedCalls"
 - use pragma: <ignoreNotImplementedSelectors: >


PR is here:  https://github.com/pharo-project/pharo/pull/12295


(what the PR does not yet do is to change syntax highlight to not color the 
selector red, this could be done later, too)

Reply via email to