correct me if I am wrong, but one can already deactivate a rule in Nautilus on a perpackage/class/method basis. So why not use this mechanism instead of having yet another pragma (there is a whole universe of pragmas hidden in the code) nicolas On 26/01/2023 10:46, Marcus Denker wrote:
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)
-- Nicolas Anquetil RMod team -- Inria Lille