Skip to content
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: Remove dependency on ruby #13262

Merged
merged 1 commit into from May 8, 2020

Conversation

jwnimmer-tri
Copy link
Collaborator

@jwnimmer-tri jwnimmer-tri commented May 8, 2020

Cherry-pick a patch from sdformat upstream to make the data embedding easier, and then re-implement the embedder in python.

Deprecate the @ruby external.

Closes #13231.


This change is Reviewable

Cherry-pick a patch from sdformat upstream to make the data embedding
easier, and then re-implement the embedder in python.

Deprecate the @ruby external.
@jwnimmer-tri
Copy link
Collaborator Author

@drake-jenkins-bot linux-bionic-unprovisioned-gcc-bazel-experimental-release please

@jwnimmer-tri jwnimmer-tri marked this pull request as ready for review May 8, 2020 13:27
@jwnimmer-tri
Copy link
Collaborator Author

+@sammy-tri can I interest you in feature review?

Copy link
Contributor

@sammy-tri sammy-tri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 9 of 9 files at r1.
Reviewable status: needs at least two assigned reviewers, labeled "do not merge"

Copy link
Contributor

@sammy-tri sammy-tri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+@sherm1 for platform review

Reviewable status: LGTM missing from assignee sherm1(platform), labeled "do not merge" (waiting on @sherm1)

Copy link
Member

@sherm1 sherm1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to see a unit test for embed_sdf.py if that's feasible.
Otherwise, platform :lgtm:.

Reviewed 9 of 9 files at r1.
Reviewable status: 2 unresolved discussions (waiting on @jwnimmer-tri)


tools/workspace/ruby/repository.bzl, line 7 at r1 (raw file):

def ruby_repository(name):
    print("The @ruby repository is deprecated and will be removed from " +
          "Drake on or after 2020-09-01.")

Just to make sure I understand: I see ruby removed from pkg and bzl files so we're not using it. But we will continue to download it as an external in case someone else was accessing ruby through Drake?


tools/workspace/sdformat/3bbd303.patch, line 16 at r1 (raw file):

I hope this is easier to maintain, but it also helps me when sharing
Drake with consumers that always build from source, but will not
install ruby as a compile-time prerequisite

nit: missing period

Copy link
Collaborator Author

@jwnimmer-tri jwnimmer-tri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most (maybe all) errors in embed_sdf show up as build-time or test-time errors in bazel test //multibody/parsing/.... I'll ponder if there's a useful new test to add, though.

Reviewable status: 1 unresolved discussion (waiting on @jwnimmer-tri)

a discussion (no related file):
Working on possible new unit tests.



tools/workspace/ruby/repository.bzl, line 7 at r1 (raw file):

Previously, sherm1 (Michael Sherman) wrote…

Just to make sure I understand: I see ruby removed from pkg and bzl files so we're not using it. But we will continue to download it as an external in case someone else was accessing ruby through Drake?

A fine question.

Bazel dependencies are pull-based -- i.e., only downloaded / compiled / etc if they are mentioned -- so this code is only ever parsed and run if somewhere in drake we explicitly mention it via @drake//tools/workspace/ruby or @ruby. Since we have neither mention anymore as of this PR, it's effectively dead code to us.

But if I downstream project called this macro and then said @ruby somewhere, it would continue to work for now, albeit with this new diagnostic output.

Sometimes for deprecated externals I'll add a "stub test" fake use so that CI still ensures the downloader don't break. In this case, it's simple enough code that I figured it's unlikely to bitrot in the next 3 months, even with no test.


tools/workspace/sdformat/3bbd303.patch, line 16 at r1 (raw file):

Previously, sherm1 (Michael Sherman) wrote…

nit: missing period

This is a cherry-picked commit from upstream. (I should have FYI'd it as "do not review this file.)

I should probably not diverge from what was committed there.

Copy link
Collaborator Author

@jwnimmer-tri jwnimmer-tri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! all discussions resolved, LGTM from assignees sammy-tri(platform),sherm1(platform)

a discussion (no related file):

Previously, jwnimmer-tri (Jeremy Nimmer) wrote…

Working on possible new unit tests.

OK Actually I'm going to defer this to a new PR in order to unblock CI changes. I'll post back later.


@jwnimmer-tri jwnimmer-tri merged commit 77214e6 into RobotLocomotion:master May 8, 2020
@jwnimmer-tri jwnimmer-tri deleted the sdformat-no-ruby branch May 8, 2020 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove ruby dependency
3 participants