Skip to content

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

Closed
chenBright wants to merge 1 commit into
masterfrom
fix_proto_gen
Closed

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

Conversation

@chenBright

Copy link
Copy Markdown
Owner

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:

@chenBright
chenBright force-pushed the fix_proto_gen branch 5 times, most recently from 7811be7 to 4bf43e2 Compare August 5, 2026 11:17
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