{{ message }}
Regression test for #196 bzlmod local_path_override (issue is fixed)#345
Merged
Merged
Conversation
The 2023 report (#196) was that bazel-diff failed when a bzlmod workspace's dependencies were all wired through local repositories (no BCR fetches). honnix narrowed it down to cquery returning labels with apparent vs canonical repo names that did not match the compatible target set; PR #224 fixed the handling. This is a passing regression-protection test (not @ignore'd). It exercises a minimal bzlmod workspace where the only dependency uses `local_path_override`, runs generate-hashes in both query and cquery modes, and asserts both succeed and produce hashes referencing the local-repo target. If a future change reintroduces the canonical-name mismatch or otherwise breaks local_path_override resolution, this test will fail. Verified by running the new test: //cli:E2ETest PASSED in 9.5s Refs #196 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

Summary
local_path_override(no BCR fetches). honnix narrowed it to cquery returning labels with apparent vs canonical repo names that did not match the compatible target set; PR fix: Handle canonical repo name for cquery #224 fixed that handling.bazel-diff generate-hashesandbazel-diff generate-hashes --useCquerysucceed against alocal_path_overrideworkspace and produce hashes that reference the local-overridden repo target.@Ignored — it passes today). If a future change reintroduces the canonical-name mismatch or otherwise breakslocal_path_override, this test fails.New fixture
cli/src/test/resources/workspaces/bzlmod_local_repo/:MODULE.bazel—bazel_dep+local_path_overrideondep_repodep_repo/— minimal bzlmod module exporting a file viaexports_filesBUILD—//:consumegenrule consumes@dep_repo//:helloTest asserts:
//:consume.dep_repo-bearing label (canonical@@dep_repo+//...).Test plan
bazel build //cli:cli-test-libsucceeds.bazel test //cli:E2ETest --test_filter=testBzlmodLocalPathOverrideWorks_regressionForIssue196→ PASSED in 9.5s.🤖 Generated with Claude Code