If you create a public class which extends another class, you may see a message telling you that “usage of this classifier outside of ‘foo’ module requires setting ‘Export’ flag for the dependency on ‘bar’ module”.
Notice that this warning includes an implicit condition. What if I don’t want to use the class outside its module? In fact, quite often a class is not used outside of its module.
Another such warning comes from grammar cells. They don’t support using editor components with overrides, and therefore will warn me if I attempt to use any editor component anywhere. What if I never wanted to override the component in the first place? In fact, editor components are overridden quite rarely.
In both cases there were probably technical reasons that prevented a more appropriate warning at a more appropriate place. Still, try not to follow this “pattern” in your languages.
Such warnings inform the user about a certain rule. How can you do it better?
-
Put the information about the rule in the inspector or in the main editor, if possible.
-
Put the information about the rule in the documentation of your language, where it belongs. This, of course, requires your language to have documentation.
And if you are unable to do any of the above, at least downgrade the warning to an “info” severity.