Skip to content

Fix brpc_proto_library failure when brpc is used as an external Bazel dependency - #3427

Open
chenBright wants to merge 1 commit into
apache:masterfrom
chenBright:fix_proto_gen
Open

Fix brpc_proto_library failure when brpc is used as an external Bazel dependency#3427
chenBright wants to merge 1 commit into
apache:masterfrom
chenBright:fix_proto_gen

Conversation

@chenBright

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number:

Problem Summary:

When bRPC is built as an external Bazel dependency, brpc_proto_library passes "." to
the includes attribute of cc_library. In the root package of the external repository, "."
resolves to the workspace root, causing Bazel to reject the target because it would expose
every file in the workspace to the rule and all its transitive dependents:

Traceback (most recent call last):
    File "/virtual_builtins_bzl/common/cc/cc_library.bzl", line 61, column 56, in _cc_library_impl
    File "/virtual_builtins_bzl/common/cc/cc_helper.bzl", line 1077, column 17, in _system_include_dirs
Error in fail: attribute includes: '.' resolves to the workspace root, which would allow this rule and all of its transitive dependents to include any file in your workspace. Please include only what you need

What is changed and the side effects?

Changed:

Side effects:

  • Performance effects:

  • Breaking backward compatibility:


Check List:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant