-
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
Package a subset of Drake in the Bazel build #5448
Package a subset of Drake in the Bazel build #5448
Conversation
8f9e90a
to
1aea23a
Compare
@jwnimmer-tri, this needs quite a bit more polish, but would you be willing to take an early design-review look? |
Seems okay. I posed a few details, and once its polished I can post some more. Reviewed 4 of 4 files at r1. drake/BUILD, line 5 at r1 (raw file):
BTW Do we want to explicitly mention BUILD label visibility somewhere here (private)? drake/BUILD, line 12 at r1 (raw file):
FYI One good way I've seen this done before is with delegation -- so here we just say "LIBDRAKE is whatever systems and multibody want" and in However, since in the endgame there's probably a few LIBDRAKE libraries and not just the one, I think this simpler answer is fine for now. tools/drake.bzl, line 189 at r1 (raw file):
I'm not sure that tools/drake.bzl, line 211 at r1 (raw file):
tools/package_drake.sh, line 3 at r1 (raw file):
Use Comments from Reviewable |
1aea23a
to
176a7df
Compare
@jamiesnape for feature review |
Review status: 1 of 5 files reviewed at latest revision, 5 unresolved discussions. drake/BUILD, line 5 at r1 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. drake/BUILD, line 20 at r2 (raw file):
Earlier this week, I'm almost certain that I was able to build with tools/drake.bzl, line 189 at r1 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. tools/drake.bzl, line 211 at r1 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. tools/package_drake.sh, line 3 at r1 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. (I was trying to figure out what this would do, and killed a terminal in the process. Then I realized.) Comments from Reviewable |
Review status: 1 of 5 files reviewed at latest revision, 4 unresolved discussions. drake/BUILD, line 20 at r2 (raw file): Previously, david-german-tri (David German) wrote…
Specifically, when I use Comments from Reviewable |
Reviewed 1 of 4 files at r1, 4 of 4 files at r2. drake/BUILD, line 20 at r2 (raw file): Previously, david-german-tri (David German) wrote…
I definitely recall you building with tools/package_drake.sh, line 27 at r2 (raw file):
Add a TODO for me to copy Comments from Reviewable |
+@rpoyner-tri for additional feature review Review status: all files reviewed at latest revision, 4 unresolved discussions. Comments from Reviewable |
176a7df
to
49069d8
Compare
Review status: all files reviewed at latest revision, 4 unresolved discussions. tools/package_drake.sh, line 27 at r2 (raw file): Previously, jamiesnape (Jamie Snape) wrote…
Done. Comments from Reviewable |
Reviewed 1 of 4 files at r1, 3 of 4 files at r2, 1 of 1 files at r3. tools/drake.bzl, line 207 at r3 (raw file):
tools/package_drake.sh, line 1 at r3 (raw file):
META: this file should be committed with execute permissions. tools/package_drake.sh, line 10 at r3 (raw file):
For readability, prefer $() to back-tick for command expansion. for consistency, don't mix them in a single script. tools/package_drake.sh, line 11 at r3 (raw file):
$() expressions do not also need surrounding double quotes. tools/package_drake.sh, line 12 at r3 (raw file):
expansions of $outfile need double quotes. tools/package_drake.sh, line 13 at r3 (raw file):
expansions of $mydir need double quotes. tools/package_drake.sh, line 16 at r3 (raw file):
more back-tick... tools/package_drake.sh, line 17 at r3 (raw file):
This variable expansion probably does need double quoting. tools/package_drake.sh, line 22 at r3 (raw file):
again with the back-ticks, oy... tools/package_drake.sh, line 23 at r3 (raw file):
All the expansions of $tmpdir need double quoting. (Having second thoughts about shell vs. python? =P ) tools/package_drake.sh, line 30 at r3 (raw file):
BTW, 'tis a pity that we support OSX, because linux tar has tools/package_drake.sh, line 49 at r3 (raw file):
I think this command is effectively a no-op. When you exit, you abandon a sub-shell and recover the state the prior shell, including its working directory. Comments from Reviewable |
Does this feature also need some sphinx-ish user documentation? Review status: all files reviewed at latest revision, 15 unresolved discussions. Comments from Reviewable |
Also, do we have proper redistribution hygiene for the headers of our externals that are packaged? Review status: all files reviewed at latest revision, 15 unresolved discussions. Comments from Reviewable |
Review status: all files reviewed at latest revision, 16 unresolved discussions. tools/package_drake.sh, line 10 at r3 (raw file):
On second read-through, the initialization and use of Comments from Reviewable |
Review status: all files reviewed at latest revision, 16 unresolved discussions. tools/package_drake.sh, line 10 at r3 (raw file): Previously, rpoyner-tri (Rick Poyner (rico)) wrote…
better yet Comments from Reviewable |
49069d8
to
9b5050c
Compare
I think not until the contents of the package have been nailed down.
Are you asking about licensing? Review status: 4 of 5 files reviewed at latest revision, 15 unresolved discussions. tools/drake.bzl, line 207 at r3 (raw file): Previously, rpoyner-tri (Rick Poyner (rico)) wrote…
I don't understand this comment. tools/package_drake.sh, line 1 at r3 (raw file): Previously, rpoyner-tri (Rick Poyner (rico)) wrote…
Done. tools/package_drake.sh, line 10 at r3 (raw file): Previously, rpoyner-tri (Rick Poyner (rico)) wrote…
Done. tools/package_drake.sh, line 10 at r3 (raw file): Previously, rpoyner-tri (Rick Poyner (rico)) wrote…
Done. tools/package_drake.sh, line 11 at r3 (raw file): Previously, rpoyner-tri (Rick Poyner (rico)) wrote…
Done. tools/package_drake.sh, line 12 at r3 (raw file): Previously, rpoyner-tri (Rick Poyner (rico)) wrote…
Done. tools/package_drake.sh, line 13 at r3 (raw file): Previously, rpoyner-tri (Rick Poyner (rico)) wrote…
Done. tools/package_drake.sh, line 16 at r3 (raw file): Previously, rpoyner-tri (Rick Poyner (rico)) wrote…
Done. tools/package_drake.sh, line 17 at r3 (raw file): Previously, rpoyner-tri (Rick Poyner (rico)) wrote…
Done. tools/package_drake.sh, line 22 at r3 (raw file): Previously, rpoyner-tri (Rick Poyner (rico)) wrote…
Done. tools/package_drake.sh, line 23 at r3 (raw file): Previously, rpoyner-tri (Rick Poyner (rico)) wrote…
Done. tools/package_drake.sh, line 49 at r3 (raw file): Previously, rpoyner-tri (Rick Poyner (rico)) wrote…
Done. Comments from Reviewable |
yes, licensing. I saw something like eigen/unsupported and it made my spidey-sense tingle. I guess I'll leave that to @jwnimmer-tri to fret over. Reviewed 1 of 1 files at r4. tools/package_drake.sh, line 11 at r3 (raw file): Previously, david-german-tri (David German) wrote…
BTW, you could drop the outermost double quotes above (since it contains two auto-quoted expansions joined by a non-space), but I'm willing to roll with author's discretion. Comments from Reviewable |
I'm mulling what to do about licenses, and hope to post a proposal or updated code shortly. +@jwnimmer-tri for platform review (and @jamiesnape PTAL) Review status: all files reviewed at latest revision, 3 unresolved discussions. Comments from Reviewable |
9b5050c
to
00c6a9e
Compare
Done, PTAL. Re. Review status: 2 of 8 files reviewed at latest revision, all discussions resolved. Comments from Reviewable |
Reviewed 1 of 1 files at r3, 1 of 1 files at r5, 5 of 5 files at r6. Comments from Reviewable |
@drake-jenkins-bot retest this please |
Reviewed 1 of 1 files at r5, 5 of 5 files at r6. Comments from Reviewable |
Reviewed 1 of 4 files at r2, 1 of 1 files at r5, 5 of 5 files at r6. a discussion (no related file): drake/BUILD, line 11 at r6 (raw file):
BTW Do we want to remind people here to update the list of packaged licenses below, too? drake/systems/primitives/BUILD, line 18 at r6 (raw file):
I think this list should eventually list all primitives, so for now at least should have a TODO to that effect? tools/drake.bzl, line 205 at r6 (raw file):
BTW We have been using python docstrings (within the function body) for API comments like the above. I'm not sure it matter much, though? tools/drake.bzl, line 217 at r6 (raw file):
BTW Was there any voodoo for why we need tools/package_drake.sh, line 11 at r6 (raw file):
This does bad things if $1 is empty. Comments from Reviewable |
Review status: all files reviewed at latest revision, 6 unresolved discussions. a discussion (no related file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
I like the sample project idea a lot. drake/BUILD, line 11 at r6 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. drake/systems/primitives/BUILD, line 18 at r6 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. tools/drake.bzl, line 205 at r6 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. tools/drake.bzl, line 217 at r6 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. tools/package_drake.sh, line 11 at r6 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. Comments from Reviewable |
00c6a9e
to
b783486
Compare
Reviewed 4 of 4 files at r7. Comments from Reviewable |
Contributes to #3129, #1766.
To demo this, do the following from the workspace root on OS X. (Yes, this is awkward! It's designed to be friendly to downstream build systems, and isn't especially considerate of humans.)
On Linux, skip the
install_name_tool
step, and pass-Wl,-rpath ./lib
to the compiler instead.a.out
should print18.000000
.This change is