cuberite / cuberite

A lightweight, fast and extensible game server for Minecraft

Home Page:https://cuberite.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deprecation handling

tonitch opened this issue · comments

The code should handle deprecation of function in cuberite source and in Lua function as well

This would be cool to avoid excessive amount of code that does nothing or might be security hole, etc

As there is no version in cuberite I suggest we work with time. Something like, small changes not game breaking should stay a year and game breaking changes could stay 2 or something

Maybe a macro would do the job, with a message and the date of the change. This would display a message on every usage of the function then on the final day, anyone would be free to delete the function with a PR

I don't really know how we should do that so this is only a suggestion, I would be happy to ear what you think

I guess you're thinking of more of a documented process?

At the moment we are deprecating functions exported to Lua, but on an ad-hoc and informal basis, mainly with a mix of warnings messages on the C++ side, warning messages in manually-written Lua binding code, and text warnings in the API docs.

For internal C++ functions, they are of course removed when not needed anymore, and for actual gameplay logic, it tends to evolve organically, mostly following what the latest Minecraft does (if possible, but up to the developer).

Adding a date to all future deprecations would be a useful change I think, and maybe a cull of the already-existing ones.