Skip to content

Commit

Permalink
Work around possible Bazel providers bug
Browse files Browse the repository at this point in the history
Apparently in newer versions of Bazel (starting with 0.5? As of 0.5.3 at
least...), Bazel doesn't recognize that a provider is the same entity if
one BUILD loads the .bzl file that declares the provider with a
workspace-qualified name, and another omits the workspace qualification.
Since these are the same .bzl, this feels suspiciously like a Bazel bug.
Anyway, work around the issue by always using the workspace-qualified
path.

This should get `bazel build install` working again with Bazel 0.5.3.
  • Loading branch information
mwoehlke-kitware authored and Francois Budin committed Aug 2, 2017
1 parent 43c4d89 commit d3339d1
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 10 deletions.
2 changes: 1 addition & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# OSX it won't conflict with a build artifacts directory named "build".

load("//tools:check_licenses.bzl", "check_licenses")
load("//tools:install.bzl", "install", "install_files")
load("@drake//tools:install.bzl", "install", "install_files")
load("//tools:lint.bzl", "add_lint_tests")

package(
Expand Down
2 changes: 1 addition & 1 deletion drake/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

package(default_visibility = ["//visibility:public"])

load("//tools:install.bzl", "install")
load("@drake//tools:install.bzl", "install")
load("//tools:lint.bzl", "add_lint_tests")
load("//tools:transitive_hdrs.bzl", "transitive_hdrs_library")

Expand Down
2 changes: 1 addition & 1 deletion drake/bindings/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file contains rules for Bazel; see drake/doc/bazel.rst.

load("//tools:gurobi.bzl", "gurobi_test_tags")
load("//tools:install.bzl", "install")
load("@drake//tools:install.bzl", "install")
load("//tools:lint.bzl", "add_lint_tests")
load("//tools:mosek.bzl", "mosek_test_tags")
load(":pybind.bzl", "drake_pybind_cc_binary")
Expand Down
2 changes: 1 addition & 1 deletion drake/common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ load(
"drake_cc_googletest",
"drake_cc_library",
)
load("//tools:install.bzl", "install")
load("@drake//tools:install.bzl", "install")
load("//tools:lint.bzl", "add_lint_tests")

package(default_visibility = ["//visibility:public"])
Expand Down
2 changes: 1 addition & 1 deletion drake/lcmtypes/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

package(default_visibility = ["//visibility:public"])

load("//tools:install.bzl", "install")
load("@drake//tools:install.bzl", "install")
load("//tools:lcm.bzl", "lcm_cc_library", "lcm_py_library", "lcm_java_library")
load("//tools:lint.bzl", "add_lint_tests")

Expand Down
2 changes: 1 addition & 1 deletion tools/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- python -*-

load(
"//tools:install.bzl",
"@drake//tools:install.bzl",
"cmake_config",
"exports_create_cps_scripts",
"install_cmake_config",
Expand Down
7 changes: 6 additions & 1 deletion tools/install/gflags/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# -*- python -*-

load("//tools:install.bzl", "cmake_config", "install", "install_cmake_config")
load(
"@drake//tools:install.bzl",
"cmake_config",
"install",
"install_cmake_config",
)
load("//tools:lint.bzl", "add_lint_tests")

package(default_visibility = ["//visibility:public"])
Expand Down
7 changes: 6 additions & 1 deletion tools/install/jchart2d/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# -*- python -*-

load("//tools:install.bzl", "cmake_config", "install", "install_cmake_config")
load(
"@drake//tools:install.bzl",
"cmake_config",
"install",
"install_cmake_config",
)
load("//tools:lint.bzl", "add_lint_tests")

package(default_visibility = ["//visibility:public"])
Expand Down
7 changes: 6 additions & 1 deletion tools/install/optitrack_driver/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# -*- python -*-

load("//tools:install.bzl", "cmake_config", "install", "install_cmake_config")
load(
"@drake//tools:install.bzl",
"cmake_config",
"install",
"install_cmake_config",
)
load("//tools:lint.bzl", "add_lint_tests")

package(default_visibility = ["//visibility:public"])
Expand Down
7 changes: 6 additions & 1 deletion tools/install/protobuf/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# -*- python -*-

load("//tools:install.bzl", "cmake_config", "install", "install_cmake_config")
load(
"@drake//tools:install.bzl",
"cmake_config",
"install",
"install_cmake_config",
)
load("//tools:lint.bzl", "add_lint_tests")

package(default_visibility = ["//visibility:public"])
Expand Down

0 comments on commit d3339d1

Please sign in to comment.