Bug 560

Summary: NS_DEPRECATED methods give no hints about how to change API
Product: ns-3 Reporter: Rajib Bhattacharjea <raj.b>
Component: documentationAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: craigdo, mathieu.lacage
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   

Description Rajib Bhattacharjea 2009-04-29 15:26:45 UTC
On gcc, our -Werror option during compile causes compilation to fail if you use any deprecated methods.  Reading the header files with the offending APIs gives no hint about how to change your model/script, while inspecting the code of the deprecated methods gives you the clue you need.  These need to be documented as deprecated, along with the part that should also be in CHANGES.html that tells you how to fix your code to use the new API.

List of the deprecated methods in src/ of ns-3-dev as of today:

simulator/simulator.h:
  static void EnableLogTo(char const *)
helper/point-to-point-helper.h: 
  void SetDeviceParameter(std::string,const AttributeValue &)
  void SetChannelParameter(std::string,const AttributeValue &)
helper/csma-helper.h:
  void SetDeviceParameter(std::string,const AttributeValue &)
  void SetChannelParameter(std::string,const AttributeValue &)
common/packet.h:
  static void EnableMetadata (void)
Comment 1 Craig Dowell 2009-04-29 15:58:20 UTC
I believe these methods should all be removed since they have been hanging around for several releases, now.

The original idea (IIRC) was to mark them deprecated for one release cycle and then remove them.  The documentation should be in the changes for the release in which they were marked as deprecated, and the fact that they were removed noted in the next release.


Comment 2 Mathieu Lacage 2009-04-30 03:51:51 UTC
+1
Comment 3 Mathieu Lacage 2009-05-19 09:36:55 UTC
changeset: c11b6d768ab3