We've been using AngelScript for quite some time and had to deprecate some global variables and functions over the years. We try to keep backward compatibility, so they are still supported, but may not play nicely with newer features. However, our users who don't check our documentation for updates are often unaware of deprecation and use those entities anyway, commonly leading to bugs that they have trouble finding. Is there a way we could detect usage of such deprecated entities in a module and issue a compile-time warning?
Deprecation warning for application-registered entities
My first idea would be to check the reference count of such objects and print a warning if they exceed 1 (I'm assuming that one reference is reserved for the engine).
Hmm, I can't think of an easy way for this. You could use the JIT compiler interface and go through the bytecode to see if any of the deprecated entitites are being accessed, but it would probably be much easier to modify the library to print a warning while compiling the code if the deprecated entity is accessed.
I'll add this to my to-do list as this sounds like the kind of feature that the core library would have to have.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game