-
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
[workspace] Clean up NLopt vendoring patches #20453
[workspace] Clean up NLopt vendoring patches #20453
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: 2 unresolved discussions
tools/workspace/nlopt_internal/package.BUILD.bazel
line 173 at r1 (raw file):
_SRCS_STOGO_CABI = [ "src/algs/stogo/stogo.cc",
BTW I was surprised to see a .cc file located in a CABI
group. I had to look at the code to see why. For simple pattern matchers like myself, it might be worth making a note about why this counterintuitive pattern is nevertheless correct ("C-callable front-end" definition).
(Same on the AGS CABI below.)
tools/workspace/nlopt_internal/patches/vendor.patch
line 18 at r1 (raw file):
// to the BFGS code below #if 0 -#include "nlopt.h"
BTW What's the value of removing a line guarded by #if 0
?
06bb8e9
to
63c59a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 unresolved discussion
tools/workspace/nlopt_internal/package.BUILD.bazel
line 173 at r1 (raw file):
Previously, SeanCurtis-TRI (Sean Curtis) wrote…
BTW I was surprised to see a .cc file located in a
CABI
group. I had to look at the code to see why. For simple pattern matchers like myself, it might be worth making a note about why this counterintuitive pattern is nevertheless correct ("C-callable front-end" definition).(Same on the AGS CABI below.)
Added comments.
Also this one had both CABI symbols as well as what should have been a file-local class. I also added a patch file to mark it as such.
tools/workspace/nlopt_internal/patches/vendor.patch
line 18 at r1 (raw file):
Previously, SeanCurtis-TRI (Sean Curtis) wrote…
BTW What's the value of removing a line guarded by
#if 0
?
The vendor_cxx tool has some rough edges. An include statement here would cause the inline namespace to cross the #if 0
block.
Rename "vendoring.patch" to the more Drake-conventional "vendor.patch". Instead of patching "extern 'C'" into the external code, adjust the BUILD file to distinguish between C++ code and C code and only run the vendor_cxx tool on C++ code.
63c59a1
to
2be33a5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r2, all commit messages.
Reviewable status: complete! all discussions resolved, LGTM from assignee SeanCurtis-TRI(platform)
tools/workspace/nlopt_internal/patches/vendor.patch
line 18 at r1 (raw file):
Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
The vendor_cxx tool has some rough edges. An include statement here would cause the inline namespace to cross the
#if 0
block.
Ahhhh.
Rename "vendoring.patch" to the more Drake-conventional "vendor.patch". Instead of patching "extern 'C'" into the external code, adjust the BUILD file to distinguish between C++ code and C code and only run the vendor_cxx tool on C++ code.
Rename "vendoring.patch" to the more Drake-conventional "vendor.patch".
Instead of patching
extern 'C'
into the external code, adjust the BUILD file to distinguish between C++ code and C code and only run thevendor_cxx
tool on C++ code.Amends #17288.
Towards #17231.
+@SeanCurtis-TRI how do you feel about both feature and platform review? Otherwise we can tag Rico for feature.
This change is