Project

General

Profile

Feature #4566

Examples for NDN_CXX_DEPRECATED

Added by Junxiao Shi almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Docs
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
1.00 h

Description

NDN_CXX_DEPRECATED macro was introduced in Oct 2017 but it isn’t used in ndn-cxx codebase and doesn’t have any examples. It is difficult for developers to figure out how to use it correctly.
This issue is to add examples on how to use this macro for deprecating a type, a variable, and a function.
The examples shall appear in Doxygen, and in unit tests to ensure they are correct.

#1

Updated by Junxiao Shi almost 3 years ago

  • Status changed from New to Code review
  • Assignee set to Junxiao Shi
  • % Done changed from 0 to 100
#2

Updated by Junxiao Shi almost 3 years ago

I'm not sure if this is worthwhile...

This IS worthwhile. The codebase should not leave any developer confused. Having documentation is always better than not having them.
In fact, I would not use the macro until this documentation is in place, and therefore this blocks #4526.

we will soon be able to require C++14, at that point we can drop the macro altogether and use the standard attribute [[deprecated]] directly (which can be used in more situations)

This is irrelevant to the need of having documentation NOW. Dropping the macro removes the documentation and tests, of course.

#3

Updated by Junxiao Shi almost 3 years ago

#4

Updated by Davide Pesavento almost 3 years ago

Junxiao Shi wrote:

This is irrelevant to the need of having documentation NOW. Dropping the macro removes the documentation and tests, of course.

On the contrary, it is very relevant. There really is no point in documenting something that we know will be removed in a month or two. Moreover, not documenting it reduces that chances that other projects will start using it, and then break when we remove it.

#5

Updated by Davide Pesavento almost 3 years ago

  • Blocks deleted (Feature #4526: Recognize typed name components)
#6

Updated by Davide Pesavento almost 3 years ago

and don't add ridiculous blockers please...

#7

Updated by Junxiao Shi almost 3 years ago

In this case, I will not work on any commit that rely on this macro. They will be blocked until this macro is removed.

#8

Updated by Davide Pesavento almost 3 years ago

Note that I haven't -1'd the change. I still think it's pointless and I'm not changing my mind, but I don't care if someone else wants to merge it.

#9

Updated by Junxiao Shi almost 3 years ago

  • Status changed from Code review to Closed
  • Start date deleted (04/01/2018)

Also available in: Atom PDF