Ability to specify per_file_copt for external repositories
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
I want to be able to add the following to my .bazelrc in order to silence unused parameter warnings from protobufs. However, per_file_copt does not seem to work with the leading `@` to identify other repositories.
`--per_file_copt=@com_google_protobuf//.*,@com_google_protobuf//.*@-Wnounused-parameter`
(Of course other personally less appealing alternatives include setting `-Wnounused-parameter` for everything or going inside the protobuf repo and cleaning up the hundred or so warnings.)
Contributor guide
Research direction
Start by tracing Bazel's per_file_copt handling for patterns beginning with @ and compare it with the .bazelrc syntax shown in the issue. Reproduce the protobuf warning case using that configuration; done means the option suppresses the targeted warnings in @com_google_protobuf without applying the flag globally.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100