Handle ambiguous headers in BCR#183
Draft
mateusz-olczyk wants to merge 9 commits intoEngFlow:mainfrom
Draft
Conversation
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
Signed-off-by: Mateusz Olczyk <molczyk@virtuslab.com>
jayconrod
reviewed
Jan 20, 2026
Collaborator
jayconrod
left a comment
There was a problem hiding this comment.
This is showing as +178,752 −32,736, too much to review. Can you split the update of bzldep-index.json into a separate PR? Then I can review that part by re-running the tool and verifying it produces the same output.
Collaborator
Author
Sure, I'll do that later. For now, I've converted it to a draft, because a new problem appeared: #184 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #173
New
index.DependencyIndextype is now applied everywhere. TypeccDependencyIndexhas been dropped.This review is not so huge; most of the lines come from the new
bzldep-index.json.Warning
I needed to turn off
WithAmbiguousTargetsResolved()call in BCR indexer. For some reason, the algorithm resolves"grpcpp/grpcpp.h"only to"@grpc//:grpc++_codegen_proto", which is incorrect.bazel query 'somepath(":grpc++_codegen_proto", ":grpc++")'returns empty result, which is bad, because:grpc++contains the crucial compiled code.I guess the function
GroupTargetsByHeaders()is not the right strategy for solving conflicts, because it groups targets if they intersect with at least one header in their"hdrs"lists - whatever it is.Instead of grouping targets like this, we should consider the mapping from each recognized header to its parent targets. And then resolve conflicts in such defined groups of targets. This way, each header is treated separately.