diff --git a/multibody/multibody_tree/multibody_plant/BUILD.bazel b/multibody/multibody_tree/multibody_plant/BUILD.bazel index af68dbd2e042..b27cf5677d22 100644 --- a/multibody/multibody_tree/multibody_plant/BUILD.bazel +++ b/multibody/multibody_tree/multibody_plant/BUILD.bazel @@ -16,13 +16,12 @@ package( drake_cc_package_library( name = "multibody_plant", deps = [ - ":coulomb_friction", - ":multibody_plant_core", + ":everything", ], ) drake_cc_library( - name = "multibody_plant_core", + name = "everything", srcs = [ "multibody_plant.cc", ], diff --git a/tools/lint/library_lint.bzl b/tools/lint/library_lint.bzl index 7056c78613af..5b3d276ceca4 100644 --- a/tools/lint/library_lint.bzl +++ b/tools/lint/library_lint.bzl @@ -95,45 +95,17 @@ def library_lint( # If there was a package_library rule, ensure its deps are comprehensive. if package_library_rule: - # If snopt is disabled, we have to use a dummy scope and expression. - # - # Details: When snopt is enabled, we obtain the @snopt source code via - # git. When snopt is disabled, there is no guarantee that git is still - # going to work (e.g., the repository is authenticated). Normally this - # is not a problem. However, during a `bazel query` or `genquery()` - # computation, Bazel still builds a graph where the conditional - # dependency on snopt is reified, and so its repository_rule gets run - # (and fails). Thus, we shouldn't do any genquery() operations unless - # snopt is enabled. Instead, we'll scope the genquery to a dummy - # label, and nerf the expression to be definitionally empty. - # - # TODO(jwnimmer-tri) Figure out how make linting work even when snopt - # is disabled. - dummy = "@bazel_tools//tools/cpp:empty" - dummy_expression = "{} except {}".format(dummy, dummy) native.genquery( name = "library_lint_missing_deps", - expression = select({ - "//tools:with_snopt": missing_deps_expression, - "//conditions:default": dummy_expression, - }), - scope = select({ - "//tools:with_snopt": scope, - "//conditions:default": [dummy], - }), + expression = missing_deps_expression, + scope = scope, testonly = 1, visibility = ["//visibility:private"], ) native.genquery( name = "library_lint_extra_deps", - expression = select({ - "//tools:with_snopt": extra_deps_expression, - "//conditions:default": dummy_expression, - }), - scope = select({ - "//tools:with_snopt": scope, - "//conditions:default": [dummy], - }), + expression = extra_deps_expression, + scope = scope, testonly = 1, visibility = ["//visibility:private"], )