-
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
Install more external targets from the Bazel build #6201
Install more external targets from the Bazel build #6201
Conversation
+@jwnimmer-tri and +@mwoehlke-kitware for feature review. |
FYI @fbudin69500. |
a discussion (no related file): Comments from Reviewable |
Review status: 0 of 11 files reviewed at latest revision, 17 unresolved discussions. BUILD.bazel, line 40 at r1 (raw file):
I wonder if we should be installing optimizers (or collision libraries, for that matter)? Are consumers expected to use these directly? Are any of their headers included via public drake headers? Are any of their libraries needed by (and not statically linked into) tools/BUILD, line 80 at r1 (raw file):
Given the number of times this is happening, can we make this a macro? Our naming is pretty consistent; I think we could get away with
(...with proper formatting, and feel free to use a different name.) tools/bullet-create-cps.py, line 14 at r1 (raw file):
Should there be a Same for other externals... tools/bullet-create-cps.py, line 17 at r1 (raw file):
BTW, this is technically superfluous, since it is required by tools/bullet.BUILD, line 20 at r1 (raw file):
Pedantic: since tools/bullet.BUILD, line 37 at r1 (raw file):
Yeah... per #6144 (comment) we should probably do this... suggestion was:
...although it occurs to me now that I believe it is safe to assume that tools/bullet.BUILD, line 50 at r1 (raw file):
This should match the CPS Creating a macro would help avoid this sort of mismatch (the tools/bullet.BUILD, line 81 at r1 (raw file):
This should be unnecessary here. (If it isn't, partial path determination isn't working as intended.) tools/bullet.BUILD, line 89 at r1 (raw file):
Have you have run tools/ipopt.BUILD, line 148 at r1 (raw file):
Again, s.b. tools/ipopt.BUILD, line 179 at r1 (raw file):
Again, superfluous. tools/nlopt-create-cps.py, line 6 at r1 (raw file):
BTW... seriously, nlopt's version symbols are e.g. /me looks Yes. Yes they are. 😱 tools/nlopt.BUILD, line 136 at r1 (raw file):
Sensing a pattern yet? 😄 tools/nlopt.BUILD, line 167 at r1 (raw file):
Same... tools/pybind11-create-cps.py, line 30 at r1 (raw file):
Okay... this is correct, but I was surprised that pybind11Config.cmake just includes this directly. tools/pybind11.BUILD, line 84 at r1 (raw file):
BTW, here this is correct. (Also, the macro refactor either needs to take extra files and a Comments from Reviewable |
Review status: 0 of 11 files reviewed at latest revision, 15 unresolved discussions. a discussion (no related file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
See also my reviews. Considering there are some (currently minor, but...) mistakes that a macro would make harder to make, I agree I'd really like to see this refactored. Comments from Reviewable |
Reviewed 4 of 11 files at r1. BUILD.bazel, line 40 at r1 (raw file): Previously, mwoehlke-kitware (Matthew Woehlke) wrote…
I was just looking at that for Bullet. No Drake tools/bullet.BUILD, line 15 at r1 (raw file):
I am not sure that we should install the Bullet headers, but if we do then we need to make sure the tools/bullet.BUILD, line 42 at r1 (raw file):
Meta It looks like #6190 is going to pass review, so probably new PRs should follow its style and use Comments from Reviewable |
Review status: 4 of 11 files reviewed at latest revision, 17 unresolved discussions. tools/bullet.BUILD, line 15 at r1 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
It will once I bump the Comments from Reviewable |
Review status: 4 of 11 files reviewed at latest revision, 17 unresolved discussions. tools/bullet.BUILD, line 15 at r1 (raw file): Previously, jamiesnape (Jamie Snape) wrote…
So for Bullet, either the (Let's move the "Should we install?" discussion to the Comments from Reviewable |
Review status: 4 of 11 files reviewed at latest revision, 17 unresolved discussions. tools/bullet.BUILD, line 15 at r1 (raw file):
I have it ready locally, so it will be on this PR. Comments from Reviewable |
BUILD.bazel, line 40 at r1 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
On the question on "should we", I haven't thought too hard about it. I don't think installing Bullet etc. here is an immediate must -- because (1) Drake's use of those libraries is entirely hidden under virtual interfaces, and (2) the immediate priority is to get Director & Spartan working so that we can turn off the duplicated CMake build logic -- and I don't think the wrapped solver engines and collision engines are on that critical path (but correct me if I'm wrong). However, in the big picture I think installing these libraries is probably appropriate, for the possible case that some user wants to use exactly the same version as Drake in the future. Certainly if a user did need exactly that we'd need to use this solution -- and so writing the code now for it is only a question of priority management. (Alternatively, keep in mind another solution is to allow the CMake user to build Drake against their version of BulletCollistion -- and in fact we know we'd like to support this in the future also. That might entirely obviate the need to ever install Bazel's build of it -- if you want to know what Bullet is used, build it yourself.) So in short: I think its fine to add this, but please keep in mind the relative priorities, and IMO getting Director and Spartan is the only thing that matters in the current spiral. Comments from Reviewable |
Review status: 4 of 11 files reviewed at latest revision, 17 unresolved discussions. tools/bullet.BUILD, line 15 at r1 (raw file): Previously, jamiesnape (Jamie Snape) wrote…
@jwnimmer-tri, thanks; I'd meant to ask if the support for CPS Aside: the first three Google results for "common package specification" are my pages 😄. Comments from Reviewable |
Review status: 3 of 30 files reviewed at latest revision, 17 unresolved discussions, some commit checks failed. tools/BUILD, line 80 at r1 (raw file): Previously, mwoehlke-kitware (Matthew Woehlke) wrote…
A macro would be great for this indeed. It is cumbersome to have to write all the export files individually. tools/bullet.BUILD, line 15 at r1 (raw file): Previously, mwoehlke-kitware (Matthew Woehlke) wrote…
👍 for adding Definitions in CPS. Comments from Reviewable |
Something strange going on with the previous push. Hold off reviewing for a moment. |
Review status: 3 of 13 files reviewed at latest revision, 16 unresolved discussions. tools/bullet-create-cps.py, line 14 at r1 (raw file): Previously, mwoehlke-kitware (Matthew Woehlke) wrote…
The spec says that no tools/bullet-create-cps.py, line 17 at r1 (raw file): Previously, mwoehlke-kitware (Matthew Woehlke) wrote…
Done. tools/bullet.BUILD, line 15 at r1 (raw file): Previously, fbudin69500 (Francois Budin) wrote…
Done. tools/bullet.BUILD, line 20 at r1 (raw file): Previously, mwoehlke-kitware (Matthew Woehlke) wrote…
Done. tools/bullet.BUILD, line 37 at r1 (raw file): Previously, mwoehlke-kitware (Matthew Woehlke) wrote…
Done. tools/bullet.BUILD, line 50 at r1 (raw file): Previously, mwoehlke-kitware (Matthew Woehlke) wrote…
Done. tools/bullet.BUILD, line 81 at r1 (raw file): Previously, mwoehlke-kitware (Matthew Woehlke) wrote…
Done. tools/bullet.BUILD, line 89 at r1 (raw file): Previously, mwoehlke-kitware (Matthew Woehlke) wrote…
Done. tools/ipopt.BUILD, line 148 at r1 (raw file): Previously, mwoehlke-kitware (Matthew Woehlke) wrote…
Done. tools/ipopt.BUILD, line 179 at r1 (raw file): Previously, mwoehlke-kitware (Matthew Woehlke) wrote…
Done. tools/nlopt.BUILD, line 136 at r1 (raw file): Previously, mwoehlke-kitware (Matthew Woehlke) wrote…
Done. tools/nlopt.BUILD, line 167 at r1 (raw file): Previously, mwoehlke-kitware (Matthew Woehlke) wrote…
Done. Comments from Reviewable |
Review status: 3 of 13 files reviewed at latest revision, 15 unresolved discussions. tools/BUILD, line 80 at r1 (raw file): Previously, fbudin69500 (Francois Budin) wrote…
Not sure if I agree, but if this were a macro, I would probably remove the Comments from Reviewable |
Review status: 3 of 13 files reviewed at latest revision, 15 unresolved discussions. tools/bullet.BUILD, line 42 at r1 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. Comments from Reviewable |
(should be good to review now) |
Reviewed 2 of 6 files at r3, 1 of 4 files at r4. tools/bullet.BUILD, line 22 at r3 (raw file):
FYI It'd be nice to find a way to wrap this to <= 80. Maybe a linebreak after the final tools/bullet.BUILD, line 24 at r3 (raw file):
Hmm... this is probably redundant with the one in LinearMath, since tools/bullet.BUILD, line 39 at r4 (raw file):
BTW nit Missed Comments from Reviewable |
Review status: 4 of 13 files reviewed at latest revision, 16 unresolved discussions. tools/bullet.BUILD, line 22 at r3 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. tools/bullet.BUILD, line 24 at r3 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. tools/bullet.BUILD, line 39 at r4 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. Comments from Reviewable |
Reviewed 6 of 11 files at r1, 24 of 24 files at r2. Comments from Reviewable |
Reviewed 6 of 11 files at r1, 1 of 24 files at r2, 2 of 6 files at r3, 4 of 4 files at r5. tools/BUILD, line 80 at r1 (raw file): Previously, jamiesnape (Jamie Snape) wrote…
How would that work? In order to use the script, it has to be made available to the package... Maybe we could instead modify the WORKSPACE macro to copy it, like we do for tools/bullet-create-cps.py, line 14 at r1 (raw file): Previously, jamiesnape (Jamie Snape) wrote…
Er... yes and no? I think logically they are equivalent. The spec says that if you ask for an older version, a newer version is not compatible. But if you ask for a newer version, an older versions is not acceptable either, so the effect is the same as only accepting the exact version. (In any case, the spec is correct; if my logic is wrong, go with the spec and not my previous comment.) Anyway, the intent was to verify that we intend no compatibility if the user asks for a version older than the actual version. tools/bullet-create-cps.py, line 20 at r4 (raw file):
This is inconsistent; in Bazel, the def is on LinearMath; here it is on BulletCollision. Probably it should be consistent? tools/install.bzl, line 426 at r5 (raw file):
BTW, hmm... the original intent was to separate internals from stuff that users would actually call, but sure, I can see the (pedantically correct) distinction. Okay, this WFM. tools/pybind11-create-cps.py, line 30 at r5 (raw file):
BTW, what about the Comments from Reviewable |
tools/bullet-create-cps.py, line 20 at r4 (raw file): Previously, mwoehlke-kitware (Matthew Woehlke) wrote…
I had a draft of the same defect. Similarly, we need comments in each of the two files that mention this fact to refer to keeping in sync with the other file. Comments from Reviewable |
Reviewed 1 of 6 files at r3, 3 of 4 files at r5. Comments from Reviewable |
Reviewed 3 of 11 files at r1, 1 of 24 files at r2, 1 of 6 files at r3, 3 of 4 files at r4, 1 of 4 files at r5. tools/install.bzl, line 482 at r4 (raw file):
Please explain that the rule tools/ipopt-create-cps.py, line 20 at r4 (raw file):
Probably worth noting the Comments from Reviewable |
Reviewed 1 of 1 files at r6. Comments from Reviewable |
Review status: 6 of 13 files reviewed at latest revision, 6 unresolved discussions, some commit checks failed. tools/bullet-create-cps.py, line 14 at r1 (raw file): Previously, mwoehlke-kitware (Matthew Woehlke) wrote…
Indeed, that is the intent. tools/bullet-create-cps.py, line 20 at r4 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. tools/install.bzl, line 482 at r4 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. tools/ipopt-create-cps.py, line 20 at r4 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. Comments from Reviewable |
Reviewed 7 of 7 files at r7. Comments from Reviewable |
Reviewed 7 of 7 files at r7. Comments from Reviewable |
Review status: all files reviewed at latest revision, 4 unresolved discussions, some commit checks failed. tools/bullet-create-cps.py, line 13 at r2 (raw file):
Heh... tools/install.bzl, line 482 at r7 (raw file):
Pedantic: IOW:
tools/ipopt-create-cps.py, line 20 at r7 (raw file):
I probably would have left this on one line, but whatever. BTW, "METIS" is not a license known to SPDX (nor did I spot it in a cursory inspection of the source), but AFAICT "make up an identifier" is TRTTD in such cases. Comments from Reviewable |
Review status: 8 of 15 files reviewed at latest revision, 2 unresolved discussions. tools/BUILD, line 80 at r1 (raw file): Previously, mwoehlke-kitware (Matthew Woehlke) wrote…
Done. tools/install.bzl, line 482 at r7 (raw file): Previously, mwoehlke-kitware (Matthew Woehlke) wrote…
Done. Comments from Reviewable |
Reviewed 7 of 7 files at r8. Comments from Reviewable |
Reviewed 4 of 7 files at r7, 7 of 7 files at r8. tools/install.bzl, line 482 at r7 (raw file): Previously, jamiesnape (Jamie Snape) wrote…
TY! Comments from Reviewable |
There is currently an issue with installing the IPOPT libraries, but they are statically linked into
libdrake.so
, so hopefully that is not a blocker. Toward #3129.This change is