Skip to content

Commit

Permalink
workspace: Remove unused protobuf (but not libprotobuf) (RobotLocomot…
Browse files Browse the repository at this point in the history
…ion#12450)

We no longer need the message generation nor compilation machinery, but we
still need the runtime support libraries for some of our deprecated methods.

Specifically, all bazel machinery for protobuf message generation is removed:
- @com_google_protobuf//...
- @drake//:protobuf
- @drake//:protobuf_python
- @drake//:protoc
- @drake//tools/skylark:drake_proto.bzl
- @protoc//...

Some runtime machinery remains, to be removed on 2020-02-01:
- @libprotobuf
- setup/mac/binary_distribution/Brewfile:brew 'protobuf'
- setup/ubuntu/source_distribution/packages-bionic.txt:python3-protobuf
- setup/ubuntu/binary_distribution/packages-bionic.txt:libprotobuf-dev
  • Loading branch information
jwnimmer-tri authored Dec 9, 2019
1 parent 1b93675 commit 5e11a50
Show file tree
Hide file tree
Showing 26 changed files with 169 additions and 953 deletions.
16 changes: 0 additions & 16 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,6 @@ exports_files([
".drake-find_resource-sentinel",
])

alias(
name = "protoc",
actual = "@com_google_protobuf//:protoc",
)

alias(
name = "protobuf",
actual = "@com_google_protobuf//:protobuf",
)

alias(
name = "protobuf_python",
actual = "@com_google_protobuf//:protobuf_python",
)

# Drake's top-level module; all drake_py_stuff rules add this to deps.
# (We use py_library here because drake_py_library would be circular.)
# This file should NOT be installed (see commits in __init__.py).
Expand All @@ -57,7 +42,6 @@ install(
deps = [
"//bindings/pydrake:install",
"//common:install",
"//common/proto:install",
"//examples:install",
"//lcmtypes:install",
"//manipulation/models:install_data",
Expand Down
14 changes: 0 additions & 14 deletions attic/multibody/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ load(
"@drake//tools/skylark:drake_cc.bzl",
"drake_cc_package_library",
)
load(
"@drake//tools/skylark:drake_proto.bzl",
"drake_cc_proto_library",
)
load("@drake//tools/skylark:test_tags.bzl", "gurobi_test_tags")
load("//tools/lint:lint.bzl", "add_lint_tests")

Expand All @@ -37,7 +33,6 @@ drake_cc_package_library(
":rigid_body_loop",
":rigid_body_tree",
":rigid_body_tree_alias_groups",
":rigid_body_tree_alias_groups_proto",
":rigid_body_tree_cc",
":rigid_body_tree_cc_0",
":rigid_body_tree_cc_1",
Expand Down Expand Up @@ -368,21 +363,12 @@ drake_cc_library(
],
)

drake_cc_proto_library(
name = "rigid_body_tree_alias_groups_proto",
srcs = [
"alias_groups.proto",
],
visibility = ["//visibility:private"],
)

drake_cc_library(
name = "rigid_body_tree_alias_groups",
srcs = ["rigid_body_tree_alias_groups.cc"],
hdrs = ["rigid_body_tree_alias_groups.h"],
deps = [
":rigid_body_tree",
":rigid_body_tree_alias_groups_proto",
"//common:essential",
],
)
Expand Down
28 changes: 0 additions & 28 deletions attic/multibody/alias_groups.proto

This file was deleted.

4 changes: 2 additions & 2 deletions attic/multibody/rigid_body_tree_alias_groups.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

/**
* This class provides a way to create aliases to groups of RigidBody or
* DrakeJoint objects. The creation of these groups can be done either
* programmatically or via an AliasGroups protobuf config file.
* DrakeJoint objects. The creation of these groups can be done
* programmatically.
*
* For example, suppose we have a RigidBodyTree with 6 links named
* [link0 ~ link5], and 6 joints [base, joint0 ~ joint4]. We can "rename"
Expand Down
29 changes: 1 addition & 28 deletions common/proto/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ drake_cc_library(
],
deps = [
"//common:essential",
"@com_google_protobuf//:protobuf",
"@libprotobuf",
],
)

Expand Down Expand Up @@ -74,25 +74,6 @@ drake_py_binary(
],
)

_UBSAN_H = "//third_party:com_github_google_protobuf/protobuf-ubsan-fixup.h"

# This library is used by //tools/skylark:drake_proto.bzl. Developers should
# never need to mention it directly. The source code is placed in third_party
# because it is forked from protobuf upstream, and thus copyright by Google.
cc_library(
name = "protobuf_ubsan_fixup",
hdrs = [_UBSAN_H],
include_prefix = "drake/common/proto",
strip_include_prefix = "/third_party/com_github_google_protobuf",
tags = [
# Developers should not use this directly.
"exclude_from_package",
# Don't install via cc_library; instead, rely on the :install rule
# below to handle the install path correctly.
"exclude_from_libdrake",
],
)

drake_cc_library(
name = "rpc_pipe_temp_directory",
srcs = ["rpc_pipe_temp_directory.cc"],
Expand All @@ -104,14 +85,6 @@ drake_cc_library(
],
)

install(
name = "install",
hdrs = [_UBSAN_H],
hdr_dest = "include/drake/common/proto",
hdr_strip_prefix = ["com_github_google_protobuf"],
allowed_externals = [_UBSAN_H],
)

# === test/ ===

drake_cc_googletest(
Expand Down
1 change: 0 additions & 1 deletion setup/ubuntu/source_distribution/packages-bionic.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ openssh-client
patch
patchelf
patchutils
protobuf-compiler
python3-boto3
python3-dateutil
python3-dbg
Expand Down
15 changes: 0 additions & 15 deletions third_party/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,6 @@ exports_files(
visibility = ["@spruce//:__pkg__"],
)

exports_files(
[
"com_github_google_protobuf/LICENSE",
"com_github_google_protobuf/protobuf.bzl",
],
licenses = ["notice"], # BSD-3-Clause
visibility = ["@com_google_protobuf//:__pkg__"],
)

exports_files(
["com_github_google_protobuf/protobuf-ubsan-fixup.h"],
licenses = ["notice"], # BSD-3-Clause
visibility = ["//common/proto:__pkg__"],
)

exports_files(
["com_github_grahamdumpleton_wrapt/" + f for f in [
"LICENSE",
Expand Down
42 changes: 0 additions & 42 deletions third_party/com_github_google_protobuf/LICENSE

This file was deleted.

8 changes: 0 additions & 8 deletions third_party/com_github_google_protobuf/README.md

This file was deleted.

77 changes: 0 additions & 77 deletions third_party/com_github_google_protobuf/protobuf-ubsan-fixup.h

This file was deleted.

Loading

0 comments on commit 5e11a50

Please sign in to comment.