Draft
bazel/reachability: fix WORKSPACE-mode failure for apparent-name exclusion test fixtures#1124
Conversation
Signed-off-by: Ryan Northey <ryan@synca.io>
Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix WORKSPACE-mode Bazel job failure due to missing repo definition
bazel/reachability: fix WORKSPACE-mode failure for apparent-name exclusion test fixtures
Aug 31, 2026
phlax
force-pushed
the
bazel-deps-reach
branch
from
August 31, 2026 14:39
9e1dcf8 to
f548991
Compare
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.
The apparent-name exclusion test fixtures (
apparent_excluded_repo,apparent_excluded_transitive_repo) were declared only via the bzlmod module extension inMODULE.bazel, sobazel test //dependency/test/...failed under--noenable_bzlmod --enable_workspacewithno such package '@@apparent_excluded_repo//'.reachability_test_extension.bzlinto a publicreachability_test_repos()macro, using the same_test_reporepository rule (already WORKSPACE-compatible). The module extension implementation now just calls this macro.bazel/WORKSPACEnow callsreachability_test_repos()directly, so the fixture repos exist under both bzlmod and WORKSPACE mode without gating any test targets to one mode.exclusions_reachability_test.shhard-coded a check for a bzlmod-mangled canonical repo name. Under WORKSPACE, canonical name equals apparent name, so the apparent-name exclusion test degenerates to a plain exclusion check there — the assertion now verifies the dependency is recorded under its apparent name regardless of mode.MODULE.bazel.lockdigest updated automatically to reflect the extension implementation change.