Skip to content

bazel/reachability: fix WORKSPACE-mode failure for apparent-name exclusion test fixtures - #1124

Draft
phlax with Copilot wants to merge 3 commits into
bazel-deps-reachfrom
copilot/fix-workspace-mode-error
Draft

bazel/reachability: fix WORKSPACE-mode failure for apparent-name exclusion test fixtures#1124
phlax with Copilot wants to merge 3 commits into
bazel-deps-reachfrom
copilot/fix-workspace-mode-error

Conversation

Copilot AI commented Aug 31, 2026

Copy link
Copy Markdown

The apparent-name exclusion test fixtures (apparent_excluded_repo, apparent_excluded_transitive_repo) were declared only via the bzlmod module extension in MODULE.bazel, so bazel test //dependency/test/... failed under --noenable_bzlmod --enable_workspace with no such package '@@apparent_excluded_repo//'.

  • Shared repo declarations: extracted the fixture repo declarations in reachability_test_extension.bzl into a public reachability_test_repos() macro, using the same _test_repo repository rule (already WORKSPACE-compatible). The module extension implementation now just calls this macro.
  • WORKSPACE wiring: bazel/WORKSPACE now calls reachability_test_repos() directly, so the fixture repos exist under both bzlmod and WORKSPACE mode without gating any test targets to one mode.
  • Test assertion adjustment: one assertion in exclusions_reachability_test.sh hard-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.
  • Lockfile: MODULE.bazel.lock digest updated automatically to reflect the extension implementation change.

phlax and others added 2 commits August 31, 2026 14:12
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
Copilot AI requested a review from phlax August 31, 2026 13:56
@phlax
phlax force-pushed the bazel-deps-reach branch from 9e1dcf8 to f548991 Compare August 31, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants