Use mapped repository names for watched files.#818
Open
sbarfurth wants to merge 1 commit intobazelbuild:mainfrom
Open
Use mapped repository names for watched files.#818sbarfurth wants to merge 1 commit intobazelbuild:mainfrom
sbarfurth wants to merge 1 commit intobazelbuild:mainfrom
Conversation
Member
|
Hrm, seems like probably a reasonable thing do to. Do you think you (or claude?) could add an e2e test to verify this functionality? |
81a99e1 to
fc61b49
Compare
Bazel repositories have a canonical and a mapped/apparent name. The apparent name appears in labels whereas the canonical name is used in the file tree. The old logic was not taking mappings into account. This would lead to files being discard from watching due to their labels having the apparent name. Example: ```starlark bazel_dep(name = "my_cool_dep", repo = "foo") ``` This would lead to files inside the repository having labels starting with `@foo//...`. The canonical repo name is `my_cool_dep+` so the path on disk is something like `.../external/my_cool_dep+`. The old logic would look at the `bazel query` results and check for `my_cool_dep+` as the repository name, but it was actually `foo` which maps to `my_cool_dep+`. All files were discarded from watching and `ibazel` printed *Didn't find any files to watch from query*.
fc61b49 to
c15c8b7
Compare
Author
|
@achew22 added a test targeted at this specifically |
Author
|
If this gets merged, how long do you think before we could see a release? |
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.
Bazel repositories have a canonical and a mapped/apparent name. The apparent name appears in labels whereas the canonical name is used in the file tree. The old logic was not taking mappings into account. This would lead to files being discard from watching due to their labels having the apparent name.
Example:
This would lead to files inside the repository having labels starting with
@foo//.... The canonical repo name ismy_cool_dep+so the path on disk is something like.../external/my_cool_dep+. The old logic would look at thebazel queryresults and check formy_cool_dep+as the repository name, but it was actuallyfoowhich maps tomy_cool_dep+. All files were discarded from watching andibazelprinted Didn't find any files to watch from query.