• Yong Tang's avatar
    Add repository name to build_defs.bzl (#5104) · 155c5590
    Yong Tang authored
    In flatbuffers, build_defs.bzl has been updated to have the
    bazel rule `flatbuffer_cc_library` defined. Therefore, it should
    be possible to build another application and using `flatbuffer_cc_library`
    directly (by `load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")`)
    
    However, when I tried to do the above, I saw the following errors in bazel:
    ```
    ERROR: /root/.cache/bazel/_bazel_root/c27e9809996ce9a9c0ed8dd79ef0897b/external/arrow/BUILD.bazel:12:1: in deps attribute of cc_library rule @arrow//:arrow_format: target '@arrow//:runtime_cc' does not exist. Since this rule was created by the macro 'flatbuffer_cc_library', the error might have been caused by the macro implementation in /root/.cache/bazel/_bazel_root/c27e9809996ce9a9c0ed8dd79ef0897b/external/com_github_google_flatbuffers/build_defs.bzl:216:16
    ```
    
    The reason for the bazel error was that `//:runtime_cc` and `//:flatc` does not have
    the repo name prefixed.
    
    By prefix `` the above bazel build error could be resolved.
    
    This fix should help other programs to use flatbuffers directly through bazel.
    Signed-off-by: 's avatarYong Tang <yong.tang.github@outlook.com>
    155c5590
Name
Last commit
Last update
.appveyor Loading commit data...
.github Loading commit data...
.travis Loading commit data...
CMake Loading commit data...
android Loading commit data...
conan Loading commit data...
dart Loading commit data...
docs Loading commit data...
go Loading commit data...
grpc Loading commit data...
include/flatbuffers Loading commit data...
java/com/google/flatbuffers Loading commit data...
js Loading commit data...
lobster Loading commit data...
lua Loading commit data...
net/FlatBuffers Loading commit data...
php Loading commit data...
python Loading commit data...
reflection Loading commit data...
rust/flatbuffers Loading commit data...
samples Loading commit data...
src Loading commit data...
tests Loading commit data...
.clang-format Loading commit data...
.editorconfig Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
BUILD Loading commit data...
CMakeLists.txt Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE.txt Loading commit data...
WORKSPACE Loading commit data...
appveyor.yml Loading commit data...
build_defs.bzl Loading commit data...
composer.json Loading commit data...
conanfile.py Loading commit data...
package.json Loading commit data...
pom.xml Loading commit data...
readme.md Loading commit data...