How long should we keep deprecated methods?

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

How long should we keep deprecated methods?

Post by bitplane »

I just removed getMS3DJointNode and getXJointNode which had been sat in the API unused for a few years and was thinking: what amount of time is a reasonable length to keep deprecated methods before they are removed from the API?

I was thinking two, maybe three major releases, with a warning in the docs saying when they were deprecated and/or when they will be removed.

Any thoughts, objections or other ideas? How do other APIs deal with this?
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

I don't know how other libraries handle this, but three major releases seems a bit long to me

I always interpret deprecated functions as 'don't expect this function to be available in the next release', and maybe it's not a bad idea to keep deprecated functions for just one major release so people don't integrate these too deeply in their code
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yeah, I'd also take one or two major releases as typical. However, some projects keep deprecated functions for ages...
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

In my opinion, if in current major release we have signed some function as a deprecated in next major release this function should be removed.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

Imho it would be OK to remove such methods in the next major version (one version where it's marked as deprecated, next version it's gone). I guess this helps to keep the interface small.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Post by REDDemon »

sure remove early unused code and make irrlicht more modern in the fastest possible way :). what is deprecated now can be removed from 1.8 and what is marked as deprecated in 1.8 will be removed in 1.9
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
agamemnus
Posts: 283
Joined: Sun Jan 31, 2010 6:06 pm

Post by agamemnus »

Doesn't matter to me, as long as the API and docs clearly state it will be deprecated... in huge bold capitalized letters nobody can miss. (instead of a tiny footnote for example...) :D

Also, what would be great is that along with the note, we can clearly see what methods/function(s) it is replaced by. :)
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Okay, I'll go through the deprecated methods in trunk (1.8) and mark them for removal in 1.9. The \deprecated tag doesn't appear to be showing up in the doxygen docs, I guess this needs fixing.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

There's a \deprecated tag for Doxygen, which we already used for e.g. the bine methods you just removed.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Oh, you're right, I see them now.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
agamemnus
Posts: 283
Joined: Sun Jan 31, 2010 6:06 pm

Post by agamemnus »

Just as an extra: if possible, I would make several improvements to the style. All the functions just kind of meld together right now.

*First, I would separate each item with a line break and a space. (between the "returns" section and the parameters section of a next function)

* Second, I would put create a heading text for each item before its parameters section. IE: "createImage" in (bold?) bigger text, as a heading, before its parameters box.

* I would put an additional "(deprecated)" tag for the heading if it is deprecated... I realize that a lot of functions are overloaded, so I am not sure how to easily modify this to handle overloaded functions.

* More info for deprecated section. For example, for one of the "createImage"s, it is stated that we should "Create an empty image and use copyTo()", but there is no link or other explanation on how we should actually create an empty image.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You can create your own doxygen style as you want and re-run the API creation process locally.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Or even better, post the changes to the patch tracker :)
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
pippy3
Posts: 155
Joined: Tue Dec 15, 2009 7:32 am

Post by pippy3 »

Am I evil for thinking as soon as its deprecated, just remove it?

A quick google of the error after upgrading irrlicht versions will likely point to a forum post of someone with the same problem and solution.
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

IIRC "deprecated" is used to give developers some time to modify their code to use non-deprecated methods, so I thinks it's a good idea to keep those functions in for one major version. I don't know if the current C++ compilers support a "deprecated" warning that points you to deprecated methods you use - Java does (about the only thing I really like in Java ;) ).
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Post Reply