Quote from: eri0o on Thu 28/11/2024 17:23:48What we do currently in the API ignores the compiler, it's solved before, in the preprocessor. One would need to properly imagine how this idea proposed would work with some annotation. I don't have a good idea for this - the compiler doesn't know about the APIs at all today, and the script header for the engine script API has nothing special vs any other script header.
Well, I'm not familiar with how the compiler works, but my thinking is that when some element has been annotated, that sets a flag on it, so that when the compiler comes across it being referenced, it throws an error. That it doesn't distinguish the script API from any other script header isn't necessarily a problem—it might even be a good thing to expose the ability to annotate things in this way for module writers.
Quote from: eri0o on Thu 28/11/2024 17:23:48Are you suggesting something for now to the future, or like, resurrecting the gazillion lines of API that were deleted from the land before time in ags4?
I mean, the main thing is to implement it for the future, but if someone then wants to go and add annotated deprecated/obsolete hooks for commonly used APIs that have been removed, that wouldn't be unwelcome (as long as it doesn't show up in the IDE autocomplete, or at least shows a deprecated warning in the tooltip).