-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DRAKE_DEPRECATED macro #2621
Add DRAKE_DEPRECATED macro #2621
Conversation
I'm going to assume for now that "status: do not review" implies "do not test" as well. |
Got rid of "unused variable" warnings in test. Updated CHANGELOG.
Ready for review now. Feature: +@liangfok, platform: +@jwnimmer-tri please. Review status: 0 of 5 files reviewed at latest revision, all discussions resolved. Comments from Reviewable |
Awesome. Testing now. Review status: 0 of 5 files reviewed at latest revision, all discussions resolved. Comments from Reviewable |
I tested this and it works. However, can we add a SWIG scenario to the unit test? I was having issues with SWIG in #2597. FTR, using
I suspect using Reviewed 2 of 4 files at r1, 2 of 3 files at r2, 1 of 1 files at r3. drake/common/drake_deprecated.h, line 9 [r3] (raw file):
Wow. I did not realize the deprecated macro could be used for so many different things. The unit tests only include classes and functions. Should typedefs, variables, non-static data members, arguments, enumerations, and template specialization also be covered by the unit tests? drake/common/drake_deprecated.h, line 21 [r3] (raw file):
Missing period at end of message. drake/common/drake_deprecated.h, line 25 [r3] (raw file):
Missing period at end of message. drake/common/drake_deprecated.h, line 41 [r3] (raw file):
BTW, there seems to be a missing "too" in front of "much". drake/common/test/drake_deprecated_test.cc, line 10 [r3] (raw file):
BTW, I believe one way would be to have the unit test actually compile a small test program that calls a deprecated function and analyze the output of the compile process. http://stackoverflow.com/questions/3803465/how-to-capture-stdout-stderr-with-googletest @david-german-tri: Is this something we should try to do here for educational purposes? Is there a better way to use Google Test to evaluate compile-time output? drake/common/test/drake_deprecated_test.cc, line 20 [r3] (raw file):
Missing period at end of error message. drake/common/test/drake_deprecated_test.cc, line 21 [r3] (raw file):
BTW, I recall there being some recommendation against using single character variables because they don't convey much in the way of semantics. Consider Comments from Reviewable |
Reviewed 2 of 4 files at r1, 2 of 3 files at r2, 1 of 1 files at r3. drake/common/drake_deprecated.h, line 51 [r3] (raw file):
BTW all of the variants prefix "DRAKE DEPRECATED " in the now -- is this comment still what you want to say? drake/common/test/drake_deprecated_test.cc, line 3 [r3] (raw file):
Unused? drake/common/test/drake_deprecated_test.cc, line 4 [r3] (raw file):
Unused? drake/common/test/drake_deprecated_test.cc, line 10 [r3] (raw file):
|
Review status: 3 of 5 files reviewed at latest revision, 8 unresolved discussions. drake/common/drake_deprecated.h, line 9 [r3] (raw file):
|
All reviewer comments addressed. PTAL. Review status: 3 of 5 files reviewed at latest revision, 11 unresolved discussions. Comments from Reviewable |
Reviewed 1 of 2 files at r4. Comments from Reviewable |
Reviewed 1 of 2 files at r4. Comments from Reviewable |
Reviewed 2 of 2 files at r4. Comments from Reviewable |
Add a portable macro for marking classes, functions, variables, etc. as deprecated.
This change is